>  기사  >  백엔드 개발  >  php5.4 织梦dedecms后台登录空白问题_PHP教程

php5.4 织梦dedecms后台登录空白问题_PHP教程

WBOY
WBOY원래의
2016-07-13 10:43:35750검색

有不少喜欢尝新的朋友会碰服务器安装php5.4版本之后dedecms5.7登录后面一篇白茫茫的啊,像下雪一样哦,下面我们来看dedecms后台登录空白问题问题办法。

linux,php5.4, 织梦dedecms后台登录空白,原因:

include/userlogin.class.php,里面有一个keepuser()函数,是用session_register来注册一个session变量,但是在php5.4中已经移除了这个功能

 代码如下 复制代码

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

如下:
if (!isset($_SESSION[$this->keepUserIDTag]))
//@session_register($this->keepUserIDTag);

我的修改前与修改后的代码


解决方法:找开include/userlogin.class.php文件,查找以下内容:

 代码如下 复制代码

@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, ‘/’);

替换成

global $admincachefile,$adminstyle;
if(empty($adminstyle)) $adminstyle = ‘dedecms’;
//@session_register($this->keepUserIDTag);
$_SESSION[$this->keepUserIDTag] = $this->keepUserIDTag;
$_SESSION[$this->keepUserIDTag] = $this->userID;
//@session_register($this->keepUserTypeTag);
$_SESSION[$this->keepUserTypeTag] = $this->keepUserTypeTag;
$_SESSION[$this->keepUserTypeTag] = $this->userType;
// @session_register($this->keepUserChannelTag);
$_SESSION[$this->keepUserChannelTag] = $this->keepUserChannelTag;
$_SESSION[$this->keepUserChannelTag] = $this->userChannel;
//@session_register($this->keepUserNameTag);
$_SESSION[$this->keepUserNameTag] = $this->keepUserNameTag;
$_SESSION[$this->keepUserNameTag] = $this->userName;
//@session_register($this->keepUserPurviewTag);
$_SESSION[$this->keepUserPurviewTag] = $this->keepUserPurviewTag;
$_SESSION[$this->keepUserPurviewTag] = $this->userPurview;
// @session_register($this->keepAdminStyleTag);
$_SESSION[$this->keepAdminStyleTag] = $this->keepAdminStyleTag;
$_SESSION[$this->keepAdminStyleTag] = $adminstyle;
PutCookie(‘DedeUserID’, $this->userID, 3600 * 24, ‘/’);
PutCookie(‘DedeLoginTime’, time(), 3600 * 24, ‘/’);

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/633170.htmlTechArticle有不少喜欢尝新的朋友会碰服务器安装php5.4版本之后dedecms5.7登录后面一篇白茫茫的啊,像下雪一样哦,下面我们来看dedecms后台登录空白问题...
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.