Some types of data can not be serialized thus stored in sessions. It includes resource variables or objects with circular references (i.e. objects which passes a reference to itself to another object). 一些类型的 数据不能被序例化并保存在session中,包括资源变量和有着循环(递归)参数的对象(如将一个参数传递给自身或其他对象的对象).
资源变量:$conn之类的Notice: admin_register() [function.admin-register]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "database" 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 /home/virtualftp/zendteam/admin_oper_func.php on line 34 Warning: pg_query(): supplied argument is not a valid PostgreSQL link resource in /home/virtualftp/zendteam/admin_oper_func.php on line 41 
_____________________________________________________________程序执行一个不完整对象的方法或属性.在unserialize() 前或自动加载前,请确保你的类加载大体意是讲,如果传递对象,在unserialize() 前,你要加载相关类,随后再unserialize(),再调用其方法或属性 .但资源变量和有着循环(递归)参数的对象不能用session传递

解决方案 »

  1.   

    谢谢,但是还有问题1,资源变量:$conn之类的,$conn又是什么。能再举个例子吗?
    有着循环递归参数的对象呢?举个例子吧。2,类加载的含义,是否就是声明了该类在这个文件是可用的。3,看过资料说session在调用时自动调用serialize(),去除session时自动调用unserialize().这个资料没错吧。