你在哪一頁include這個類?應該是你創建物件時,呼叫建構子沒有輸入參數做成的

解决方案 »

  1.   

    <?php
    include_once("class/LibHead.inc.php");
    $GAsort = new ArticlesortMgr();
    $sql = "SELECT sid,sname FROM articlesort sort";
    $result = $GAsort->GetSort($sql);
    while($showsort = $GAsort -> fetch_array($result))
    {
    echo ($showsort['sid'].$showsort['sname']."<br>");
    }?>
      

  2.   

    function ArticlesortMgr($oArticlesort){ 报这里错误???
    $oImfly = new Imfly();
    $this->_oDB = $oImfly->DB;
    $this->_oArticlesort = $oArticlesort;
    }
    你的构造函数是有形参的。。
    你实例化的时候没有给参数。
    可以设置默认值~~~
      

  3.   

    function ArticlesortMgr($oArticlesort = 默认值){ 
    $oImfly = new Imfly();
    $this->_oDB = $oImfly->DB;
    $this->_oArticlesort = $oArticlesort;
    }