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

Reply via email to