登录页面无效。
$_SESSION['user_id'] = $user_details[0]['id'];
$_SESSION['currentid'] = $user_details[0]['id'];
$_SESSION['admin_username'] = $user_details[0]['user_name'];
$_SESSION['admin_status'] = $user_details[0]['user_role'];
$_SESSION['user_role'] = $user_details[0]['user_role'];
header("location:dashboard.php");
会话值在此重定向之前工作,但dashboard.php文件具有以下代码,并且我无法获得会话值。甚至在服务器中也启用了默认会话。
include ("../includes/config.inc.php");
$objAdmin = new Admin();
$objAdmin->Admin_authetic();
https://i.stack.imgur.com/l5aWH.png
任何人都可以为此问题提供解决方案吗?
答案 0 :(得分:1)
确保您在dashboard.php
上有document.readyState