<?phpdefined (' in_phpcms ') or exit (' No permission resources. '); Pc_base::load_app_func (' Global '), class index{private $db;p rivate $content _db;private $order _db;public function __ Construct () {}/** * processing, filling out order information */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 ');} /** * processing, confirming order information */public function Confirm_order () {new_addslashes (New_html_special_chars ($_post)); Extract ($_post[' Info ']); Includetemplate (' Order ', ' Confirm_order ');} /** * Save order */public function Save_order () {new_addslashes (New_html_special_chars ($_posT)); $this->order_db = Pc_base::load_model (' Order_model '); Load the model and instantiate $this->db = Pc_base::load_model (' Order_model '); Load the model and instantiate Reflectionobject::export ($this->order_db); The reflection output is the same as the Reflectionobject::export ($this->db); Ibid. 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 (); Can call $this->order_db->add_order (); cannot be called, fatal error 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 ');}}
Do not know whether this is a phpcms system error or PHP error, or my own error