Results 1 to 3 of 3
Aug 22, 2001, 12:19 #1
Using PHP to retrieve absolute URL
This is probably easy, but I can't seem to find the answer at PHP.net. I need to have PHP determine the *absolute* URL of the current page, such as...
So $PHP_SELF won't work for this purpose. AND... it needs to reflect the URL of the *parent* document if the command (whatever it is) originates from an included file. (It should not list the URL of the included file).
Can anyone help? Thanks!
Aug 22, 2001, 12:47 #2
- Join Date
- Aug 2000
- San Diego, CA
- 0 Post(s)
- 0 Thread(s)
I think this should work for you
$pagesrc = $HTTP_HOST.$REQUEST_URI;
Please don't PM me with questions.
Use the forums, that is what they are here for.
Aug 22, 2001, 13:02 #3
That did the trick! All I had to add was the "http://" at the beginning. Thanks!