CodeIgniter Forums
model load error. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: model load error. (/showthread.php?tid=52854)



model load error. - El Forum - 06-29-2012

[eluser]Ram Krishna[/eluser]
i am having problem in calling model function in my controller.my controller code is
Code:
<?php

class Quote extends CI_Controller {

function __construct()
{
  parent::__construct();
  $this->load->helper(array('form', 'url'));
  
}

function index()
{
  $this->load->view('request_quote_form');
}

function do_upload()
{
  $config['upload_path'] = './uploads/';
  $config['allowed_types'] = 'gif|jpg|png|doc|docx|jpeg|pdf|txt|ppt|zip|php';
  

  $this->load->library('upload', $config);

  
     $data = $this->upload->data();
        $file_name=$data['file_name'];
        $this->load->model('quote_model');
        $this->qoute_model->quote_insert($file_name);

  
}
}
?>



model load error. - El Forum - 06-29-2012

[eluser]PhilTem[/eluser]
I don't know what error you're actually receiving, but I see that you still need to ad

Code:
$this->upload->do_upload())

before you can call

Code:
$data = $this->upload->data();

Maybe this already solves your problem Wink