Reputation: 15
I am new user of codeigniter i coded in modle and when i load the model in controller it gave me earror
the error is: Fatal error: Call to undefined method CI_Loader::modle() in C:\wamp\www\CI\application\controllers\Test.php on line 10
My model code is:
<?
class Sitemodle extends CI_Model
{
function getall()
{
$this->load->database();
$query=$this->db->get('2');
if ($query-> num_rows()>0) {
foreach ($query->result() as $row )
{
$data[]=$row;
}
return $data;
}
}
}
?>
and controller code is this:
<?php
class Test extends CI_Controller{
function index()
{
$this->load->modle('Sitemodle');
$this->load->view('home');
}
}
Upvotes: 0
Views: 7156
Reputation: 3663
$this->load->model('Sitemodle');
It is spelled wrong it should be model to load the model of CI
And for user guide you can use the URL of your project/user_guide its there only with the CI project folder. Just you need to access it.
Upvotes: 2