0
header("Location: …");
似乎並不奏效:HTTP與頭功能重定向不起作用
<?php
session_start();
if (isset($_SESSION['user'])){
?>
<html>
<head>
<title>
Admin Panel
</title>
</head>
<body>
</body
</html>
<?php
} else {
header("Location: http://echo2.site40.net/cms/admin/login.php");
}
?>
你可以定義_not working_?你有什麼錯誤嗎? – Florent 2012-07-13 14:24:33
不只是不會去登錄頁面,它必須becuae會話沒有設置 – user1523770 2012-07-13 14:35:54
那麼,'$ _SESSION ['用戶']'可能未定義... – Florent 2012-07-13 14:39:18