我在登陆时把SESSION["User"]赋值,但是取值时提示:
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 "UserData" 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 F:\MyDocuments\java\AcgIndex\src\pages\HomePage.php on line 32不知道为什么?

解决方案 »

  1.   

    代码呢?是不是$_SESSION['User']; 写错了 看提示是找不到类 要自动加载
      

  2.   

    你的session是从数据库里读出来的把!!!序列化过了!!你把SESSION打出来看看!
      

  3.   

    很可能是你没有对读出的SESSION数据进行反序列化,就进行赋值了!你检查下读取之后的处理过程!问题应该是出在这!
      

  4.   

    php.ini的里面有没有设置好!
      

  5.   

    如果没对从数据数据库中读出的session数据进行反序列化,SESSION就不是数组结构!!如何能用SESSION["User"]赋值