更换服务器后网站后台出现空白,经研究发现这个函数在PHP5.4版本中已经被弃用了,已经被删除了。也就是这个函数不再可用了。直接注释掉就可以了,不用进行注册就可以声明session。
解决方法是:
找到include文件夹中的userlogin.class.php文件中
@session_register下的所有语句屏蔽掉。红色部分
function keepUser()
{
if($this->userID != ” && $this->userType != ”)
{
global $admincachefile,$adminstyle;
if(empty($adminstyle)) $adminstyle = ‘dedecms’;
/*@session_register($this->keepUserIDTag);*/
$_SESSION[$this->keepUserIDTag] = $this->userID;
/* @session_register($this->keepUserTypeTag);*/
$_SESSION[$this->keepUserTypeTag] = $this->userType;
/* @session_register($this->keepUserChannelTag);*/
$_SESSION[$this->keepUserChannelTag] = $this->userChannel;
/*@session_register($this->keepUserNameTag);*/
$_SESSION[$this->keepUserNameTag] = $this->userName;
/* @session_register($this->keepUserPurviewTag);*/
$_SESSION[$this->keepUserPurviewTag] = $this->userPurview;
/*@session_register($this->keepAdminStyleTag);*/
$_SESSION[$this->keepAdminStyleTag] = $adminstyle;
PutCookie(‘DedeUserID’, $this->userID, 3600 * 24, ‘/’);
PutCookie(‘DedeLoginTime’, time(), 3600 * 24, ‘/’);
$this->ReWriteAdminChannel();
return 1;
}
else{….以下省略