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

打开include/userlogin.class.php

找到

function exitUser() 

    { 

        ClearMyAddon(); 

        @session_unregister($this->keepUserIDTag); 

        @session_unregister($this->keepUserTypeTag); 

        @session_unregister($this->keepUserChannelTag); 

        @session_unregister($this->keepUserNameTag); 

        @session_unregister($this->keepUserPurviewTag); 

        DropCookie('dedeAdmindir'); 

        DropCookie('DedeUserID'); 

        DropCookie('DedeLoginTime'); 

        $_SESSION = array(); 

    } 

替换为:

function exitUser() 

    { 

        ClearMyAddon(); 

        #@session_unregister($this->keepUserIDTag);         

        $_SESSION[$this->keepUserIDTag] = $this->userID; 

        #@session_unregister($this->keepUserTypeTag);         

        $_SESSION[$this->keepUserTypeTag] = $this->userType; 

        #@session_unregister($this->keepUserChannelTag);         

        $_SESSION[$this->keepUserChannelTag] = $this->userChannel; 

        #@session_unregister($this->keepUserNameTag);         

        $_SESSION[$this->keepUserNameTag] = $this->userName; 

        #@session_unregister($this->keepUserPurviewTag);         

        $_SESSION[$this->keepUserPurviewTag] = $this->userPurview; 

        DropCookie('dedeAdmindir'); 

        DropCookie('DedeUserID'); 

        DropCookie('DedeLoginTime'); 

        $_SESSION = array(); 

    } 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/d226fec737aa3862bbb8e42d3b925292.html