【发布时间】:2012-07-02 19:34:54
【问题描述】:
我正在尝试这段代码并不断收到此错误 函数创建(){
$post = array();
//get all the data from the form into an array
$post = array(
'name' => $this->input->post('name'),
'abbrev' => $this->input->post('abbrev'),
'long_name' => $this->input->post('long_name'),
'long_abbrev' => $this->input->post('long_abbrev'),
'url' => $this->input->post('url'),
'description' => $this->input->post('description')
);
//encode the data and set it as output to push to api
$json_data=json_encode($post);
$this->curl->post('http://localhost:8888/api/colleges', $json_data);
这是我得到的错误
严重性:通知
消息:未定义属性:Colleges::$curl
文件名:controllers/colleges.php
【问题讨论】:
标签: php json codeigniter