你的php的版本是多少,还有你的php.ini文件中register_globals = on 还是off

解决方案 »

  1.   

    4.0.3  register_globals = on
    运行以上的代码可能分析比较容易点。
      

  2.   

    改成这样试试:
    function Calculate()
      {
       for($i=0;$i<$this->SortCount;$i++)
       {
         /*计算每件商品的价值,如果折扣是0 ,则为优惠价格*/
         $GiftPrice = ($this->Discount[$i] == 0 ? $this->GoodPrice :
                       ceil($this->Price[$i] * $this->Discount[$i])/100 );
         $this->TotalCost += $GiftPrice * $this->Count[$i] ;
       }
      }