RE: [PHP] inspirational
| From: | John Holmes | Date: | Sun, 26 May 2002 11:26:58 +0000 |
| Subject: | RE: [PHP] inspirational | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99295@lists.php.net to get a copy of this message | ||
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:taylorjo@collegesherbrooke.qc.ca]
> Sent: Sunday, May 26, 2002 1:39 AM
> 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é½XxYW�¼¢8²m
> );
>
> 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