Skip to content

Commit

Permalink
调整身份验证提示信息
Browse files Browse the repository at this point in the history
  • Loading branch information
Yin Qi committed Jul 26, 2016
1 parent fc06537 commit 435a672
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controller/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ protected function authentication()
}

if (!isset($_SERVER['PHP_AUTH_USER'])) {
header("WWW-Authenticate:BASIC Realm=My Realm");
header("WWW-Authenticate:BASIC Realm=authentication");
header("HTTP/1.0 401 Unauthorized");
echo("请验证身份信息");
exit;
} else if (!isset(Config::$config["USER"][$_SERVER['PHP_AUTH_USER']]) || !is_callable(Config::$config["USER"][$_SERVER['PHP_AUTH_USER']]) || !call_user_func(Config::$config["USER"][$_SERVER['PHP_AUTH_USER']], $_SERVER['PHP_AUTH_PW'])) {
header("WWW-Authenticate:BASIC Realm=My Realm");
header("WWW-Authenticate:BASIC Realm=authentication");
header("HTTP/1.0 401 Unauthorized");
echo("请输入正确的身份信息");
exit;
Expand Down

0 comments on commit 435a672

Please sign in to comment.