Re: determining script url

From: Date: Fri, 08 Feb 2002 16:59:50 +0000
Subject: Re: determining script url
Groups: php.general 
Request: Send a blank email to php-general+get-84014@lists.php.net to get a copy of this message
I'd say you should store the base url of your site in a variable somewhere. then append the REQUEST_URI and you have the url. or .. you take the SERVER_NAME, SERVER_PORT and REQUEST_URI .. and you might need some other variables to make it recognize SSL and prefix with httpS .. bvr. >How can I get the full URL of the currently running script? $DOCUMENT_ROOT is not what I need, >instead I need the url (be it domain if exists, or ip if not). $SERVER_NAME works but if a domain >isn't paired with the server, I could get some useless information (right?).

« previous php.general (#84014) next »