Re: Environment Variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux