当前位置:首页 > CMS教程 > DeDecms > 列表

DEDECMS后台登陆后显示空白页解决办法——PHP5.4环境下

发布:smiling 来源: PHP粉丝网  添加日期:2014-11-13 11:34:16 浏览: 评论:0 

登陆DEDECMS后台输入用户名和密码后没有提示显示为空白,主要原因是php5.4的版本删除了session_register函数,打开文件include/userlogin.class.php在 function keepUser()内把如下代码:

  1. @session_register($this->keepUserIDTag); 
  2. $_SESSION[$this->keepUserIDTag] = $this->userID; 
  3. @session_register($this->keepUserTypeTag); 
  4. $_SESSION[$this->keepUserTypeTag] = $this->userType; 
  5. @session_register($this->keepUserChannelTag); 
  6. $_SESSION[$this->keepUserChannelTag] = $this->userChannel; 
  7. @session_register($this->keepUserNameTag); 
  8. $_SESSION[$this->keepUserNameTag] = $this->userName; 
  9. @session_register($this->keepUserPurviewTag); 
  10. $_SESSION[$this->keepUserPurviewTag] = $this->userPurview; 
  11. @session_register($this->keepAdminStyleTag); 
  12. $_SESSION[$this->keepAdminStyleTag] = $adminstyle
  13. //开源软件:phpfensi.com 
  14. //替换成 
  15. $_SESSION[$this->keepUserIDTag] = $this->userID; 
  16. $_SESSION[$this->keepUserTypeTag] = $this->userType; 
  17. $_SESSION[$this->keepUserChannelTag] = $this->userChannel; 
  18. $_SESSION[$this->keepUserNameTag] = $this->userName; 
  19. $_SESSION[$this->keepUserPurviewTag] = $this->userPurview; 
  20. $_SESSION[$this->keepAdminStyleTag] = $adminstyle

即把每个包含@session_register的语句删除,即可以解决该问题,或者换成其他版本的php.

Tags: DEDECMS后台登陆 DEDECMS后台空白

分享到: