error de enrollamiento de codeigniter

I was trying out this piece of code and keep on getting this error function create(){

    $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);

And this is the error i get

Severidad: Aviso

Message: Undefined property: Colleges::$curl

Filename: controllers/colleges.php

preguntado el 02 de julio de 12 a las 20:07

1 Respuestas

Cambiar

 $this->curl->post('http://localhost:8888/api/colleges', $json_data);

a

 $this->load->library('curl');
 $this->curl->post('http://localhost:8888/api/colleges', $json_data);

Respondido 02 Jul 12, 21:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.