RE: [PHP] finding location of document
| From: | Rainer Bendig aka \"mindz\" | Date: | Sat, 08 Nov 2003 23:22:55 +0000 |
| Subject: | RE: [PHP] finding location of document | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-168965@lists.php.net to get a copy of this message | ||
Have a look on http://us2.php.net/manual/en/function.parse-url.php
So long
Rainer Bendig
crossx.net | wbbreference.de
-----Original Message-----
From: rogue [mailto:rogue@mail.rightcode.net]
Sent: Sunday, November 09, 2003 12:06 AM
To: php-general@lists.php.net
Subject: [PHP] finding location of document
Hi there,
I am trying to figure this out and can't find the right combination to
get what I want in a certain situation.
Suppose I am running a script from an URL like:
http://127.0.0.1/~myname/foo/bar.php
on this page I want to redirect to another page and send a full http
string like:
$redirect = "http://" . $_SERVER['HTTP_HOST'] .
"/foo/hello.php";
In this case, $_SERVER['HTTP_HOST'] is 127.0.0.1
How can I get the ~/myname/
Thanks
rogue
BTW. Please copy me directly on any replies as I am on the digest.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php