R: [PHP] getting at the server environment variables

From: Date: Sun, 31 Mar 2002 23:27:02 +0000
Subject: R: [PHP] getting at the server environment variables
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-91096@lists.php.net to get a copy of this message
make a php file and fille it with <? phpinfo(); ?> save the file run it and look at all php and apache global variables. Unknown Sender <bogus@news.php.net> wrote in message 3970617B.8177EE14@activex-dev.com... > Andreas Pour wrote: > > > Hi, > > > > Have all server requests for domain.org point to this php script: > > > > <? > > header("Location: " . ereg_replace("domain.org", > > "domain.net", > > $BASE_URL)); > > ?> > > Andreas, > > Great idea, but it doesn't work. The $BASE_URL is empty. Looking at a > PHP book I have, it appears that I should be using the HTTP_HOST server > environment variable, but being brand new to PHP, I have no clue how to > get at the variable. Can you enlighten me?

« previous php.general (#91096) next »