php unserialize报错解决记录

Fatal error: main(): The script tried to execute a method or access a property of an incomplete object.

Please ensure that the class definition "xx类"; 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 

 

使用反序列化对象时候,要提前定义类。

使用include把自己的"xx类"包含进来。

posted @ 2015-12-22 12:17  倾其一生  阅读(1583)  评论(0编辑  收藏  举报