不知道這是phpcms系統的錯誤還是php的錯誤,還是我自身的錯誤

來源:互聯網
上載者:User

標籤:os   io   ar   for   cti   sp   html   on   c   

<?phpdefined(‘IN_PHPCMS‘) or exit(‘No permission resources.‘);pc_base::load_app_func(‘global‘);class index{private $db;private $content_db;private $order_db;public function __construct(){}/** * 處理,填寫訂單資訊 */public function init(){new_addslashes(new_html_special_chars($_POST));extract($_POST[‘info‘]);$this->content_db=pc_base::load_model(‘content_model‘);$this->content_db->set_model($modelid);$line_data=$this->content_db->get_content($catid,$line_id);//print_r($line_data);$prices=string2array($line_data[‘price‘]);if ($is_group == 1){foreach ($prices as $key =>$val){if ($val[‘title‘] == $line_type){$price_group=$prices[$key];}}unset($prices);$prices[0]=$price_group;}$order_sn=get_order_sn();includetemplate(‘order‘,‘index‘);}/** * 處理,確認訂單資訊 */public function confirm_order(){new_addslashes(new_html_special_chars($_POST));extract($_POST[‘info‘]);includetemplate(‘order‘,‘confirm_order‘);}/** * 儲存訂單 */public function save_order(){new_addslashes(new_html_special_chars($_POST));$this->order_db = pc_base::load_model(‘order_model‘);   //載入模型並且執行個體化$this->db = pc_base::load_model(‘order_model‘);   //載入模型並且執行個體化ReflectionObject::export($this->order_db);   //反射輸出的是一樣的ReflectionObject::export($this->db);         //同上var_dump(method_exists($this->db, ‘add_order‘));  //truevar_dump(is_callable(array($this->order_db, ‘add_order‘)));  //true     var_dump(method_exists($this->order_db, ‘add_order‘));     //truevar_dump(is_callable(array($this->db, ‘add_order‘)));    //true$this->db->add_order();     //可以調用$this->order_db—>add_order();   //不可以調用,致命錯誤  Fatal error: Call to undefined function add_order() in /var/www/html/line/phpcms/modules/order/index.php on line 56include template(‘order‘,‘save_order‘);}}



不知道這是phpcms系統的錯誤還是php的錯誤,還是我自身的錯誤

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.