Re: Accessing env variables
| From: | Philip Hallstrom | Date: | Fri, 01 Apr 2005 20:33:27 +0000 |
| Subject: | Re: Accessing env variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-212054@lists.php.net to get a copy of this message | ||
On Fri, 1 Apr 2005, Ravi Natarajan wrote:
I have defined couple of environment variables in one of my apache module using setenv() at fixups and handler function calls. I have another php module, where I need to access these variables. So I have defined these variables as "global $var1, $var2 ..etc"; When I try to access these variables as $var1 and $var2 , they don't seem to be set, so I am not getting correct values, but they give correct values when I acess them using getenv() call. How to access these environment variables in my php code without using getenv() call.Try using $_SERVER and $_ENV... See here for more info... http://us3.php.net/reserved.variables -philip