【发布时间】:2012-12-02 12:01:45
【问题描述】:
include('conection.php');
$db=new Database();
session_start();
echo "<div style=' background-color:white; border:solid white'>".$_SESSION['uid']."</div>";
if(!(isset(**$_SESSION['uid']**)))
{
header('location:index.php');
}
if(isset($_REQUEST['admin']))
{
if(base64_decode($_REQUEST['admin'])!=='over779656')
{
header('location:index.php');
}
}
$r=explode(" ",base64_decode($_REQUEST['final']));
**$_SESSION['uid']**
这个变量的值在超过 2 小时或更长时间后被取消设置,为什么会这样,即使我没有取消设置任何变量,是否有任何服务器问题或任何浏览器问题
【问题讨论】:
-
是不是因为session过期了?会话超时?
-
修改你的ini文件并重启你的服务器,同时在header之后使用
exit -
如果您的 php.ini 位于实时服务器上,并且有许多项目使用相同的 ini 文件,或者您无权访问它。试试我的答案。
-
请阅读this important information,这可能会影响您在 SO 上找到答案的能力。
标签: php session session-variables unset