When a SESSION in PHP uploads an object, the object cannot have constructors.

Source: Internet
Author: User
When a SESSION in PHP transmits an object, the object cannot have a constructor. in the afternoon, I want to sort out a CLASS, refine it, and use a _ construct () constructor, after several hours, I could not log on again. I checked the program for half a day. it turned out that when the session in php passed the class object, the object could not have a constructor. It really killed me. But why? is it because objects with constructors cannot be serialized? When a SESSION in PHP uploads an object, the object cannot have constructors.

In the afternoon, I want to sort out a CLASS and refine it. I used a _ construct () constructor. after several hours, I could not log on again. I checked the program for half a day, it turns out that when a class object is passed through a session in php, the object cannot have constructor. it's really killing me. But why? is it because objects with constructors cannot be serialized?

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.