Re: Environment Variable
| From: | Jarratt Ingram | Date: | Wed, 08 Mar 2006 10:31:41 +0000 |
| Subject: | Re: Environment Variable | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231650@lists.php.net to get a copy of this message | ||
Hello,
If you are running on apache and have access to either the .conf file or
.htaccess you can use the apache SetEnv directive
eg. SetEnv APPLICATION_ROOT "/var/www/html/"
and then from php use the $_SERVER['APPLICATION_ROOT'] to access the correct
information
HTH
Jarratt
On 3/7/06, steff <stephane.riff@cerene.fr> wrote:
>
> Hello,
>
> I want to define my own environemnt variable "APPLICATION_ROOT" and be
> able to retrieve his value from php. As apache module, cgi, cron and
> command line.
>
> Now i'm just be able to get it from command line. In other
> (module,cgi,cron) when I print $_ENV I never get the same environment :(
>
> Is it possible to do it with PHP ???
>
> Thanks.
> Steff
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>