原文来自:https://www.zixuephp.com
dedecms后台空白页以及验证码不显示解决方法
今天配置了一天的服务器和转移网站,好不容易服务器配置好了,但是转移过去先是登陆后跳转显示空白页,好不容易把空白页改好了发现验证码又出问题了,把几个遇到的问题解决方法放出来,供大家学习借鉴.
验证码的问题很简单,我就几句话说一下,我修改userlogin.class.php 以及common.inc.php 用记事本直接打开的,出现了bom头,下个notepad++去除bom,或者直接用个common.inc.php覆盖了就行了,我就不多说了,主要讲登陆后空白页.
主要在这个文件,与dedecms5.7与php5.4+以上的兼容性问题,查include里面的 userlogin.class.php里面的keepuser()函数,把@session_register 全部改写,虽然不知道这个@是什么意思.
把@session_register($this->keepUserIDTag);注释掉,然后改为:
if (!isset($_SESSION[$this->keepUserIDTag]))
全部有6个,如下:
- 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;
然后就可以登入后台了.