超级计算机囧囧囧's Archivers

From admin on 2013-01-31 06:39:53

session中存类对象的问题

Notice: main() [function.main]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "<classname>" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in <filename> on line <line>

You get this error if you have and object in your $_SESSION array and you call session_start() before you have loaded your included classes.

如果在session中存储了类对象,不能在调用这个类之前,使用session_start().

如果你php.ini文件中开启了

session.auto_start = 1

也不行

查看完整版本: session中存类对象的问题

Tags: session


©超级计算机囧囧囧