您的位置:CSS5 > DEDECMS >

dedecms后台登陆空白 填写用户名和密码点击登陆后网页空白解决方法

发布日期:2019-05-29 21:40:08 来源:CSS5

DEDECMS安装一切都很顺利,直到登录后台的时候,填写完用户名和密码页面就显示一个空白页面,解决办法:

找到include/userlogin.class.php,里面有一个keepuser()函数,它是用session_register来注册一个session变量,但是在php5.4中已经移除了这个功能,
如果使用的该php版本肯定会出错的,不过我们可以修改下代码:

@session_register($this->keepUserIDTag);

注释掉,然后改为
if (!isset($_SESSION[$this->keepUserIDTag]))

一共有六个,全部改为下面这样:

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;

标签(Tag): dedecms 登陆 用户名
本文分享URL地址:https://www.css5.com.cn/dedecms/1533.shtml

作者:CSS5原创

上一页:上一篇:修改dedecms上传图片时去掉width宽度高度height参数
下一页:下一篇:DEDECMS调用当前所在栏目的顶级栏目ID的方法