今天心血来潮看了一下DEDECMS仿2014内涵吧漫画网(修复版)
发现后台系统配置无法保存,经测试发现中文无法保存
解决方法:
找到/dede/templets/sys_info.htm
把
1 |
htmlspecialchars($row[’value’]) |
改成
1 |
$row[’value’] |
DEDECMS在PHP5.4不能正常运行
一、在include/userlogin.class.php中加入如下代码:
1 2 3 4 |
function session_register() { return true; } |
二、将该页中的函数代码替换,被替换代码大致在287到308行之间,代码如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
@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, ’/’); |
1 |
替换如下代码: |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<pre class="lang:php decode:true ">global $admincachefile,$adminstyle; if(emptyempty($adminstyle)) $adminstyle = ’dedecms’; $_SESSION[$this->keepUserIDTag] = $this->keepUserIDTag; $_SESSION[$this->keepUserIDTag] = $this->userID; $_SESSION[$this->keepUserTypeTag] = $this->keepUserTypeTag; $_SESSION[$this->keepUserTypeTag] = $this->userType; $_SESSION[$this->keepUserChannelTag] = $this->keepUserChannelTag; $_SESSION[$this->keepUserChannelTag] = $this->userChannel; $_SESSION[$this->keepUserNameTag] = $this->keepUserNameTag; $_SESSION[$this->keepUserNameTag] = $this->userName; $_SESSION[$this->keepUserPurviewTag] = $this->keepUserPurviewTag; $_SESSION[$this->keepUserPurviewTag] = $this->userPurview; $_SESSION[$this->keepAdminStyleTag] = $this->keepAdminStyleTag; $_SESSION[$this->keepAdminStyleTag] = $adminstyle; PutCookie(’DedeUserID’, $this->userID, 3600 * 24, ’/’); PutCookie(’DedeLoginTime’, time(), 3600 * 24, ’/’); |
文章评论
网站环境是5.4的,没办法
@MNTPZ.com:网站环境是5.4的,没办法
5.7了,还研究5.4,怀旧啊?