note 9713 added to HTTP authentication with PHP
| From: | sweetland at whoadammit dot com | Date: | Mon, 20 Nov 2000 18:46:04 +0000 |
| Subject: | note 9713 added to HTTP authentication with PHP | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-7921@lists.php.net to get a copy of this message | ||
If you were trying to read the contents of $PHP_AUTH_USER or $PHP_AUTH_PW from inside a function,
you would first have to globalize them:
function Authenticat () {
global $PHP_AUTH_USER;
global $PHP_AUTH_PW;
...
}
Otherwise, PHP assumes that those variables are local to the function Authenticate () and
initializes them with NULL values.
http://www.php.net/manual/features.http-auth.php