[摘要](PHP_AUTH_PW != "goodpassword")) /* If either the username entered is incorrect, or ...
($PHP_AUTH_PW != "goodpassword")) {
/* If either the username entered is incorrect, or the password entered is incorrect, send the headers causing dialog box to appear */
header('WWW-Authenticate: Basic realm="My Private Stuff"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
} else if (($PHP_AUTH_USER == "validname")
关键词:PHP脚本的10个技巧(5)