Note: php5.4 deletes the session_unregister function _ PHP Tutorial

Source: Internet
Author: User
Note: php5.4 deletes the session_unregister function. The dedecms system was installed a few days ago. when security exits in the background, there is a blank background. Previously, only other functions were analyzed, and security was not paid much attention, after reading the security exit code, the dedecms system was installed a few days ago. when the security exits in the background, the background is blank. Previously, only other functions were analyzed, and security was not paid much attention, I read the security exit code and wrote it like this:

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 ('deadmindir ');
DropCookie ('destuserid ');
DropCookie ('delogintime ');
$ _ SESSION = array ();
}


I was surprised to hear that I had written a blank article about logging on to the background after dede was installed. This reminds me of the possible php version. my php version is 5.4, check whether the new version is correct. in php5.4, the session_unregister function is deleted. the dededecms function is too outdated to support the latest php version, alas, it takes me time to analyze. In the background, replace this function with unset to solve the problem perfectly.

...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.