Re: determining script url

From: Date: Fri, 08 Feb 2002 19:37:16 +0000
Subject: Re: determining script url
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-84037@lists.php.net to get a copy of this message
On Saturday 09 February 2002 00:17, sean@interconnect.is.it wrote: > Thanks for the response, but those are just like $DOCUMENT_ROOT, they > provide paths in the server, I need what is showing up as the URL in the > browser - i.e. http://www.domain.com/script.php - or if there > is no domain, > to give me the IP. > > any ideas? I can't seem to piece it together with the info from phpinfo() > either. > > It's so aggravating because the value of what I'm looking for is right on > screen, but I can't get the php to notice! On my system (Apache + php module): 'http://' . $HTTP_SERVER_VARS['HTTP_HOST'] . $PHP_SELF gives the the url as displayed by the browser. But you seem to be using php as CGI so YMMV. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* Life is a grand adventure -- or it is nothing. -- Helen Keller */

« previous php.general (#84037) next »