PHP determines whether a user session has a problem. it does not work before & lt; html & gt;] & lt ;? Phprequire_once & nbsp; ('config. php'); // determine the user permission if ($ _ SESSION ['member'] & nbsp ;! = & Nbsp; "adm PHP determines whether a user's session is faulty and does not work before
]
Require_once ('config. php ');
// Determine user permissions
If ($ _ SESSION ['Member ']! = "Admin "){
Echo "script" alert ('Please log onto it '); location = 'index. php'; script ";
}
?>
It didn't work before, and Firefox made a judgment, but ie still didn't work for PHP? Session? Firefox PHP session sharing: it didn't work before]
------解决方案--------------------
在页面顶部加一句session_start();
------解决方案--------------------
session和cookie是亲兄弟。
session_start()是对session信息进行初始化(在一定的概率下删除存在服务器的session文件,这个概率在php.ini中可以设置).
有不用session_start()也能访问session信息。。是因为你的cookie还在。然后服务器上的session文件也还在。这样就能读取到了。