On Wed, May 9, 2007 11:57 am, C.R.Vegelin wrote:
> I get nothing when using: echo $_ENV['OS'];
> Also nothing when using: print_r($_ENV);
> However, phpinfo(); show a full list of ENV settings.
> How to get $_ENV variables ?
> I am using PHP version 5.2.0.

If phpinfo() shows them, then that is what is there...

There's nothing magical about phpinfo() function.

It doesn't do much more than your print_r($_ENV)

So unless you are running your script in a *DIFFERENT* environment
(e.g., CLI or CGI versus Apache Module) you ought to see the same
things if you spell $_ENV correctly...

You can't even mess up variable scope, since it's a superglobal...

No, wait...

I think if you write it as a function and then declare $_ENV as
'global' you might actually manage to mess up and end up with your own
$_ENV instead of the real one...  Never tried that, but it might
"break" it.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to