Re: Getting whole URL
| From: | Rob Adams | Date: | Tue, 04 May 2004 18:31:12 +0000 |
| Subject: | Re: Getting whole URL | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185335@lists.php.net to get a copy of this message | ||
"Curt Zirzow" <php-general@zirzow.dyndns.org> wrote in message
news:20040504155344.GK26014@bagend.shire...
> * Thus wrote I.A. Gray (tech@selectperformers.com):
> > Really simple question- which I can't seem to find anywhere (hey, I am
> > blind...) Can I obtain the current URL for the page including query
strings
> > to the PHP script.
> >
> > Say the URL for the page is www.blahblahblah.com?blah=blah&blah2=blah2
>
> $_SERVER['REQUEST_URI'];
In my phpinfo() (Win2000, Apache2, PHP 4.3.4) my REQUEST_URI only gives
everything after the host. If you wanted the host information along with
that, you have to get that in the seperate index: HTTP_HOST.
-- Rob