你是否遇到过PHP5.4版本织梦dedecms后台退出空白的问题,有没有解决呢?没有解决思绪,就来看看我这篇文章吧。
解决办法:
打开include/userlogin.class.php
找到:function exitUser()
{
ClearMyAddon();
@session_unregister($this->keepUserIDTag);
@session_unregister($this->keepUserTypeTag);
@session_unregister($this->keepUserChannelTag);
@session_unregister($this->keepUserNameTag);
@session_unregister($this->keepUserPurviewTag);
DropCookie('dedeAdmindir');
DropCookie('DedeUserID');
DropCookie('DedeLoginTime');
$_SESSION = array();
}
替换为:function exitUser()
{
ClearMyAddon();
#@session_unregister($this->keepUserIDTag);
$_SESSION[$this->keepUserIDTag] = $this->userID;
#@session_unregister($this->keepUserTypeTag);
$_SESSION[$this->keepUserTypeTag] = $this->userType;
#@session_unregister($this->keepUserChannelTag);
$_SESSION[$this->keepUserChannelTag] = $this->userChannel;
#@session_unregister($this->keepUserNameTag);
$_SESSION[$this->keepUserNameTag] = $this->userName;
#@session_unregister($this->keepUserPurviewTag);
$_SESSION[$this->keepUserPurviewTag] = $this->userPurview;
DropCookie('dedeAdmindir');
DropCookie('DedeUserID');
DropCookie('DedeLoginTime');
$_SESSION = array();
}
再去试试吧
小袁亲测可行,如有问题,欢迎交流。