之前在网上下了一个dedecms的整站程序,安装好登陆后台发现一片空白,只好找度娘解决问题了。
以下是dedecms织梦登陆后台空白的解决办法
问题原因:
session_register,php5.4移除了这个函数,版本里说明,继续使用该函数会产生错误。
if (!isset($_SESSION[$this->keepUserTypeTag]))改成这个方式就可以了
解决方法:
找include/userlogin.class.php里面的keepuser()函数,
把@session_register 全部改写, 虽然不知道这个@是什么意思
把@session_register($this->keepUserIDTag); 注释掉,然后改为
if (!isset($_SESSION[$this->keepUserIDTag]))
全部有6个。
如下:
if (!isset($_SESSION[$this->keepUserIDTag]))
//@session_register($this->keepUserIDTag);
$_SESSION[$this->keepUserIDTag] = $this->userID;
if (!isset($_SESSION[$this->keepUserTypeTag]))
//@session_register($this->keepUserTypeTag);
$_SESSION[$this->keepUserTypeTag] = $this->userType;
if (!isset($_SESSION[$this->keepUserChannelTag]))
//@session_register($this->keepUserChannelTag);
$_SESSION[$this->keepUserChannelTag] = $this->userChannel;
if (!isset($_SESSION[$this->keepUserNameTag]))
//@session_register($this->keepUserNameTag);
$_SESSION[$this->keepUserNameTag] = $this->userName;
if (!isset($_SESSION[$this->keepUserPurviewTag]))
//@session_register($this->keepUserPurviewTag);
$_SESSION[$this->keepUserPurviewTag] = $this->userPurview;
if (!isset($_SESSION[$this->keepAdminStyleTag]))
//@session_register($this->keepAdminStyleTag);
$_SESSION[$this->keepAdminStyleTag] = $adminstyle;
然后就可以登入后台了。
评论前必须登录!
注册