RE: [PHP] inspirational
| From: | Ray Hunter | Date: | Sun, 26 May 2002 07:23:10 +0000 |
| Subject: | RE: [PHP] inspirational | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99285@lists.php.net to get a copy of this message | ||
Why don't you try something like this...do a system call to pwd and
strip out the portion of the url that you know is the upper directory.
Then you can exchange that for the http://www.site.com/ and then
add
the additional directories to the end and call the script name...there
might not be a function that does all this, however, you can try to work
around it....
Thanks,
Ray Hunter
-----Original Message-----
From: jtjohnston [mailto:taylorjo@collegesherbrooke.qc.ca]
Sent: Saturday, May 25, 2002 11:39 PM
To: php-general@lists.php.net
Subject: [PHP] inspirational
I want to detect the url my .php lies in.
This is over kill and BS:
$myurlvar = "http://".$SERVER_NAME.parse($SCRIPT_NAME);
How do I get "http://foo.com/dir1/dir2/dir3/".
There seems to be nothing in phpinfo() that will give me a full url to
play with.
Flame me if you will, but I browsed TFM and found nothing inspirational.
Looked at phpinfo() too and got discouraged.
I need a full url.
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php