You are here: Re: [PHP] Accessing env variables « PHP « IT news, forums, messages
Re: [PHP] Accessing env variables

Posted by Philip Hallstrom on 10/16/07 11:12

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация