If you're getting this discouraged over creating a URL, then maybe you
should give this stuff up. There's no variable that gives you the full
URL of your script, deal with it.

What is this parse() function you're using? What does it do? Why is this
"over kill and BS"?

Try this:

$myurlvar = http:// . $SERVER_NAME . dirname($SCRIPT_NAME);

---John Holmes...

> -----Original Message-----
> From: jtjohnston [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 26, 2002 1:39 AM
> To: [EMAIL PROTECTED]
> 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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to