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

WBOY
Lepaskan: 2016-07-13 10:43:35
asal
748 orang telah melayarinya

有不少喜欢尝新的朋友会碰服务器安装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后台登录空白问题...
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan