Re: Environment Variables & Functions Incompatible???
| From: | Jason Wong | Date: | Wed, 03 Apr 2002 18:15:32 +0000 |
| Subject: | Re: Environment Variables & Functions Incompatible??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91348@lists.php.net to get a copy of this message | ||
On Wednesday 03 April 2002 23:40, arti wrote:
> Besides the fact that the different versions of PHP provide different
> environment variables for determining the host, the isset() on the env
> variable works differently inside a function. What is going on here?
$HTTP_SERVER_VARS is only available in the global scope but you're trying to
use it inside the scope of your function. Here's how to do it.
function doo() {
global $HTTP_SERVER_VARS;
print_r($HTTP_SERVER_VARS);
}
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
What the scientists have in their briefcases is terrifying.
-- Nikita Khruschev
*/