主题:请问我的php程序错在那里?就是不能运行,我看了和书上是一样的
<?php
if(!isset($PHP_AUTH_USER))
{
Header("WWW-Authenticate:Basic realm=\"管理员登陆\"");
Header("HTTP/1.0 401 Unauthorized");
echo "对不起,您没有权限\n";
exit();
}
else
{
if((md5($PHP_AUTH_USER)!="admin") || (md5($PHP_AUTH_PW)!="admin"))
{ Header("WWW-Authenticate:Basic realm=\"用户名或者密码错误\"");
Header("HTTP/1.0 401 Unauthorized");
exit();}
}
?>
<html>
<head>
<title>546554</title>
</head>
<body>
dsfdsfdsfdsfdsfdsfds
</body>
</html>
系统是支持php的
if(!isset($PHP_AUTH_USER))
{
Header("WWW-Authenticate:Basic realm=\"管理员登陆\"");
Header("HTTP/1.0 401 Unauthorized");
echo "对不起,您没有权限\n";
exit();
}
else
{
if((md5($PHP_AUTH_USER)!="admin") || (md5($PHP_AUTH_PW)!="admin"))
{ Header("WWW-Authenticate:Basic realm=\"用户名或者密码错误\"");
Header("HTTP/1.0 401 Unauthorized");
exit();}
}
?>
<html>
<head>
<title>546554</title>
</head>
<body>
dsfdsfdsfdsfdsfdsfds
</body>
</html>
系统是支持php的