php - Get the visible URL -


I'm wondering how can I get the URL (visible in the bar) I have tried to google it and a lot of answers have to be written:

  $ url = "http: //". $ _ Server ['HTTP_HOST']. $ _ Server ['REQUEST_URI'];   

But it will get the path to the file in which you are coming. I would like to get the visible URL just like:

  www.something.com/index.php? Page = teams   

and then only get the URL you can see, and no included URL. When I do this, then something similar happens:

  www.something.com/search.php   

Because the IM is included in the file search URL printing .php.

I hope that you understand my question, even if it is a little worse, I find it very difficult to explain my problem.

For URL: $ _ SERVER ['REQUEST_URI']

After? In Url: $ _ server ['QUERY_STRING']

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -