title: codeigniter method error
body: <p>I'm using the following from the controller to call a method from the model but receiving and error:</p>
  
  <pre><code>//from the controller:(main.php)
  
  &lt;?php
  class Main extends CI_Controller {
  
     public function __construct() {
      parent::__construct();
     }
  
     function index() {
     .....
     $this-&gt;load-&gt;view('view_form');
  
     }//END Fn index()
  
     function get_th() {
  
     //$the=$this-&gt;input-&gt;post('th', TRUE);
     $d['shit']=$this-&gt;model_data-&gt;tst();
     $this-&gt;load-&gt;view('view_form',$d);
  
     }//END Fn get_th()
  
  }//END Cls Main
  ?&gt;
  
  //from the model:(model_data.php)
  &lt;?php
  class Model_data extends CI_Model {
  
     function slider() {
  ...
     }//END Fn slider()
  
     function check_input($data) {
  ...
     }//END Fn check_input()
  
     function tst() {
          $tsts= "hellos";
          return $this-&gt;tsts;
     }
  
  }//END Cls model_data
  ?&gt;
  </code></pre>
  
  <p>$autoload['model'] = array('model_data');</p>
  
  <p>The error:
  Fatal error: Call to undefined method Model_data::tst() in ... application\controllers\main.php...</p>