为啥加入命令行后,验证界面输入用户名和密码后进不去?用户名自动清除了。
换了几个浏览器都一样!
会不会是最近执行过升级指令,h5ai里面的内容发生了改变?原系统是7月12日的。
现在的index.php文件添加密码后的代码是这样的:
<?php
$authorization = false;
if($SERVER['PHP_AUTH_USER'] == "123" && $SERVER['PHP_AUTH_PW'] == "321"){
//echo "login";
$authorization = true;
// exit;
}
if(!$authorization){
header("WWW-Authenticate:Basic realm='Private'");
header('HTTP/1.0 401 Unauthorized');
print "You are unauthorized to enter this area.";
}
define('H5AI_VERSION', '0.30.0');
define('MIN_PHP_VERSION', '7.0.0');
if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) {
header('Content-type: text/plain;charset=utf-8');
exit('[ERR] h5ai requires PHP ' . MIN_PHP_VERSION . ' or later, but found PHP ' . PHP_VERSION);
}
if (substr(H5AI_VERSION, 0, 1) === '{') {
header('Content-type: text/plain;charset=utf-8');
exit('[ERR] h5ai sources must be preprocessed to work correctly');
}
require_once DIR . '/../private/php/class-bootstrap.php';
Bootstrap::run();
请各位看看是什么原因?谢谢!