Re: Implement @-domains with PHP?
| From: | CC Zona | Date: | Wed, 13 Feb 2002 00:24:46 +0000 |
| Subject: | Re: Implement @-domains with PHP? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84513@lists.php.net to get a copy of this message | ||
In article <20020212210725.99207.qmail@pb1.pair.com>,
asksatan42@hotmail.com (Christian Blichmann) wrote:
> "Cc Zona" <email@cczona.com> wrote in message
> news:email-674993.12493512022002@pb1.pair.com...
> > You can look over the environment vars available to you with a quick call
> > to phpinfo() <http://php.net/phpinfo>.
>
> Thanks for replying, but as Philip stated in his reply to my question
> its that the actual location doesn't appear in the environment block.
That's true, the URL does not appear there as a single preset variable;
it's up to you to re-assemble a URL out of the variables that are
available, and thus the need to scan the vars phpinfo() has to offer.
Since you're using PHP as a CGI, somewhat different variables get set than
when PHP is run as a module, so a call to phpinfo() is the best way to
identify the right vars for accomplishing your task.
Question: before you dismissed phpinfo() as useless, did you call it and
look at what's there? Because more than likely the info that you envision
extracting in a two step process (access URL, break down into needed
components) can be directly accessed from one or more environment/server
vars.
--
CC