Re: Question about using <varname>

From: Date: Wed, 26 May 2004 17:54:17 +0000
Subject: Re: Question about using <varname>
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969361019@lists.php.net to get a copy of this message
Can you explain me, why we should write <varname>PHP_AUTH_USER</varname> without symbol '$' and <varname>$HTTP_SERVER_VARS</varname> with it?
If you use the $ symbol, then it suggest that the global variable usage is suggested. PHP_AUTH_USER is supposed to be in the _SERVER array if I remember correctly, and if you write it with $, then you promote the usage of register_globals = on, which is not right. $HTTP_SERVER_VARS is the only way to access the ther variable, so it is fine with the dollar. It might be an option to write <varname>$_SERVER['PHP_AUTH_USER']</varname> (in case I am not mistaken, and this is part of the server superglobal). Goba

« previous php.doc (#969361019) next »