当前位置 : 主页 > 建站教程 > dedecms >

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

来源:互联网 收集:自由互联 发布时间:2022-05-03
解决办法: 打开include/userlogin.class.php 找到 functionexitUser() { ClearMyAddon(); @session_unregister($this-keepUserIDTag); @session_unregister($this-keepUserTypeTag); @session_unregister($this-keepUserChannelTag); @session_unre

解决办法:

打开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.     } 
网友评论
相关栏目