Re: Environment Variable
| From: | Jarratt Ingram | Date: | Wed, 08 Mar 2006 12:04:11 +0000 |
| Subject: | Re: Environment Variable | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231653@lists.php.net to get a copy of this message | ||
Sorry i ment to add to my previous email,
you will only be able to access the $_SERVER['APPLICATION_ROOT'] when using
apache and not from Cron or Command line, for that i suppose you could add
the following to the /etc/profile file
APPLICATION_ROOT=/var/www/
and then to the export line
EXPORT ..... APPLICATION_ROOT
you will need to run $ source /etc/profile
once have edited that file to make the changes affect the curernt user
logged in. That should also enable you to see it from $_ENV variable.
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
>
>