Home > Backend Development > PHP Tutorial > PHP中SESSION传对象时,该对象居然不能有构造函数

PHP中SESSION传对象时,该对象居然不能有构造函数

WBOY
Release: 2016-06-13 13:05:33
Original
866 people have browsed it

PHP中SESSION传对象时,该对象竟然不能有构造函数

下午想把一个CLASS整理一下,精炼一点,用了一个__construct()构造函数,过了几个小时重新登录的时候怎么也登录不了,查了半天程序,原来是php中session传class对象时,该对象不能有构造函数,真是搞死我了。不过这是为什么呢,难道是有构造函数的对象不能够序列化吗?

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template