PHP5.4版本dedecms后台退出空白的解决方法

具体原因请看 更换PHP 5.4以上版本后Dedecms后台登录空白的解决方法

解决办法:

打开include/userlogin.class.php

找到

  1. function exitUser() 
  2.     { 
  3.         ClearMyAddon(); 
  4.         @session_unregister($this->keepUserIDTag); 
  5.         @session_unregister($this->keepUserTypeTag); 
  6.         @session_unregister($this->keepUserChannelTag); 
  7.         @session_unregister($this->keepUserNameTag); 
  8.         @session_unregister($this->keepUserPurviewTag); 
  9.         DropCookie('dedeAdmindir'); 
  10.         DropCookie('DedeUserID'); 
  11.         DropCookie('DedeLoginTime'); 
  12.         $_SESSION = array(); 
  13.     } 

替换为:

  1. function exitUser() 
  2.     { 
  3.         ClearMyAddon(); 
  4.         #@session_unregister($this->keepUserIDTag);         
  5.         $_SESSION[$this->keepUserIDTag] = $this->userID; 
  6.         #@session_unregister($this->keepUserTypeTag);         
  7.         $_SESSION[$this->keepUserTypeTag] = $this->userType; 
  8.         #@session_unregister($this->keepUserChannelTag);         
  9.         $_SESSION[$this->keepUserChannelTag] = $this->userChannel; 
  10.         #@session_unregister($this->keepUserNameTag);         
  11.         $_SESSION[$this->keepUserNameTag] = $this->userName; 
  12.         #@session_unregister($this->keepUserPurviewTag);         
  13.         $_SESSION[$this->keepUserPurviewTag] = $this->userPurview; 
  14.         DropCookie('dedeAdmindir'); 
  15.         DropCookie('DedeUserID'); 
  16.         DropCookie('DedeLoginTime'); 
  17.         $_SESSION = array(); 
  18.     } 

转载请注明:代码家园 » PHP5.4版本dedecms后台退出空白的解决方法

评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)