phpcms到底是不是php,不知道这是phpcms系统的错误还是php的错误,还是我自身的错误...

defined('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')); //true

var_dump(is_callable(array($this->order_db, 'add_order'))); //true

var_dump(method_exists($this->order_db, 'add_order')); //true

var_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 56

include template('order','save_order');

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值