在page2.php中,将 session_start(); 放在 include("classa.inc"); 之前,也就是放在第一行(至少要放在require之前)。因为你的lxmclass.inc中第173行已经有输出了,再session_start();就会出现“Cannot send session cache limiter - headers already sent”这样的错误 

解决方案 »

  1.   

    同意cknuke(龙天).
    类的编写不是有错误,而是不合理.贴出来看看.
      

  2.   

    谢谢龙天老兄!
    那个类只是测试用的,随便写写,也不便贴出来让laosan您见笑啦.
      

  3.   

    哎呀,不行啊,龙天我照您的方法一试,出现更糟的错误.错误如下:
    Fatal error: The script tried to execute a method or access a 
    property of an incomplete object. Please ensure that the class 
    definition commondb of the object you are trying to operate on 
    was loaded _before_ the session was started in C:\lxm\page2.php 
    on line 11