Helenr
session_start();$_SESSION["name"]="admin";这样是对的判断的时候用session_start();if ($_SESSION['name'] == "admin") {echo '登录成功!';} else {}注销时:session_start();$_SESSION = array();if (isset($_COOKIE[session_name()])) {setcookie(session_name(), '', time()-42000, '/');}session_destroy();