lj0918
注册会员

UID 74490
精华
0
积分 184
帖子 130
金钱 184 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-6-5 来自 沈阳
状态 离线
|
session问题
有一购物车类,
在调用时,我要是这么写
<?php
session_start();
include("admin/set/DBclass.php");
include "cart1.php";
?>
提示错误为:
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>cart</b> of the object you are trying to operate on was loaded _before_ the session was started in d:\usr\www\html\baby\tmp.php on line 243
我要是
<?php
include("admin/set/DBclass.php");
include "cart1.php";
session_start();
?>这么写
上面的错误就没了
可是出现下面的错误
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /www/users/gawayi.com/baby/cart1.php:211) in /www/users/gawayi.com/baby/tmp.php on line 4
这个错误我在本地测试时不出来,要是上传到空间中,就会出现
为什么呀?
|
|