关于PHP SESSION的一个奇怪问题!!

大白菜芯 2005-02-17 08:05:56
我用了N个购物车了。可能是我服务器的SESSION有问题。总出现这个错误。哪位能给系统的解释解释!!

Fatal error: Unknown(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition <b>basket</b> of the object you are trying to operate on was loaded _before_ the session was started in /www/users/shop.nt.cn/cart/shop1/shop.php on line 125

同样放到别的服务器上就是没有问题的。首先代码一定是正常。 就上边的问题。希望哪位能给一个系统的说法!!!
...全文
250 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
thunderx 2005-02-24
  • 打赏
  • 举报
回复
引以为签!:)
不过我很少启用session.auto_start
一般都在文件中加session_start();
非著名码农 2005-02-24
  • 打赏
  • 举报
回复
接分来了,
keaizhong 2005-02-23
  • 打赏
  • 举报
回复
对啊,是重复session_start()了。
金钱大法师 2005-02-23
  • 打赏
  • 举报
回复
靠!kao!
问题搞定了,还不赶快揭贴!
弟兄们都等着分呢!
大白菜芯 2005-02-21
  • 打赏
  • 举报
回复
If you do turn on session.auto_start then you cannot put objects into your sessions since the class definition has to be loaded before starting the session in order to recreate the objects in your session.

看到这句话我明白了! 问题也搞定了.下次也应该不会出现了!! 哎.现在的CSDN人气好差了。起码PHP不火啊!!!
gmlwl 2005-02-20
  • 打赏
  • 举报
回复
可能是关了吧.
大白菜芯 2005-02-18
  • 打赏
  • 举报
回复
哎.是够郁闷的了。没有想到在这个问题上这么难。我原先能用的好几个都不能用了.唠叨大哥.你有好的吗.发给我一个好用的! 谢谢.其他弟兄有吗也帮忙一下!!!
  • 打赏
  • 举报
回复
这也正常,跟apache有关
xuzuning 2005-02-18
  • 打赏
  • 举报
回复
类没有实例化成功!
希望能看到shop.php 125附近的代码,最好是该文件的全部
大白菜芯 2005-02-18
  • 打赏
  • 举报
回复
Sorry, our resident telepath is off in the desert somewhere on military duty.
靠。我去phpbuilder 发这个帖子 他们值班的斑竹给我了这个恢复!母亲的!!!
jxyuhua 2005-02-17
  • 打赏
  • 举报
回复
我也碰到过,可能是服务器的问题或PHP版本的问题。

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧