Home  >  Article  >  Backend Development  >  Note: php5.4 has deleted the session_unregister function_PHP Tutorial

Note: php5.4 has deleted the session_unregister function_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 15:00:11777browse

I installed the dedecms system a few days ago. When I exited safely in the background, a blank space appeared in the background. I only analyzed other functions before and didn’t pay much attention to security. I looked at the code for safe exit and it is written like this:

Copy code The code is as follows:

function exitUser()
{
ClearMyAddon();
@($ 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 ();
}

It suddenly dawned on me that I had written an article before about the blank login background after the dede installation was completed. Then I remembered that it might be a problem with the php version. My php The version is version 5.4. After checking, it is indeed a problem with the new version. It turns out that the session_unregister function has been deleted in the php5.4 version. Damn, dedecms is too out of step with the times. At least it must support the latest php version. , Alas, it cost me so much time to analyze. In the background, replace this function with unset and it will be a perfect solution.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/328085.htmlTechArticleI installed the dedecms system a few days ago. When I exited safely in the background, a blank space appeared in the background. Previously, I only analyzed other After using the function, I didn’t pay much attention to safety. I looked at the safe exit code...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn