1.下载dedecms,并解压缩
2.把解压缩之后的文件中的uploads文件夹拷贝到/opt/lampp/htdocs/目录下(前提是你已经安装了本地服务器软件或本地服务器和数据库的IDE,如xampp) 3.用命令:chown -R nobody uploads/ 修改uploads文件夹的所属者为nobody,即apache服务器的使用者(解决使用apache服务器时权限问题) 4.当你按照上面的3步安装完成后,登录后台时,若输入的用户名,密码及验证码都确定没错误,但是点击登录后网页就空白了,这时你就要考虑使用第4步来解决了:查找/opt/lampp/htdocs/uploads/include/userlogin.class.php里面的keepuser()函数
把@session_register($this->keepUserIDTag); 注释掉,然后改为 if (!isset($_SESSION[$this->keepUserIDTag])) 全部有6个. 即把如下的代码复制粘贴到keepuser()函数中(原函数中的语句要提前注释掉或删除掉): 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; 然后就应该可以登入后台了。 问题原因: session_register,php5.4移除了这个函数,版本里说明,继续使用该函数会产生错误。 if (!isset($_SESSION[$this->keepUserTypeTag]))改成这个方式就可以了