Re: extensions and $HTTP_SERVER_VARS

From: Date: Thu, 19 Apr 2001 03:39:54 +0000
Subject: Re: extensions and $HTTP_SERVER_VARS
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-51988@lists.php.net to get a copy of this message
On Thu, 19 Apr 2001, Rasmus Lerdorf wrote: > How portable? Not all web servers even set this variable, so it will > never be completely portable. > > -Rasmus > (what Rasmus said, and :) you can grab them out of the EG(symbol_table) if you still want them: { zval **server_vars; if (zend_hash_find(&EG(symbol_table), "HTTP_SERVER_VARS", sizeof("HTTP_SERVER_VARS"), (void **) &server_vars)) == FAILURE) { php_error(E_WARNING, "ficken, no server vars"); return; } /* Manipulate server_vars :) */ } -Sterling

« previous php.dev (#51988) next »