改成
<?php
session_start();
include "config.inc.php";
session_cache_limiter(public);
session_set_cookie_params(0, "../");
session_register("userpassword");
?>
<html>
<?php
if ($user1==$USER && $password1==$PASSWORD)
{
$userpassword=$user1.$password1;
//header("Location: index.php");
echo "Ok le!";
exit();
}
?>
</html>
<?php
session_start();
include "config.inc.php";
session_cache_limiter(public);
session_set_cookie_params(0, "../");
session_register("userpassword");
?>
<html>
<?php
if ($user1==$USER && $password1==$PASSWORD)
{
$userpassword=$user1.$password1;
//header("Location: index.php");
echo "Ok le!";
exit();
}
?>
</html>
服务器的php是4.1.0版本的。破csdn ,回复了n次了,每次都出错。
header();用法前面不能有echo输出!