未勾选自动登录还是能打开index.php
function checkLogined(){
if ( $_SESSION['adminId']==""&& $_COOKIE['adminId']==""){
header("location:login.php");
}
}
$res = checkAdmin($link,$sql);
if ($res) {
if ($autoFlag) {
php_alert("1");
setcookie("adminId",$res["id"],time()+60);
setcookie("adminName",$res["username"],time()+60);
}