[eluser]markanderson993[/eluser]
Hello I am having enormous difficulty creating the simplest of models. I keep getting this error when I test my page:
Code:
Fatal error: Class model_home: Cannot inherit from undefined class models in /.../system/application/models/model_name.php on line 3
I have no idea why! I'm copying and pasting the Model example code right out of Manual!
Here is my code:
model_name.php (in the application->models folder)
Code:
<?php
class Model_name extends Model {
function Model_name()
{
parent::Model();
}
}
?>
And here is the file I am calling it from: home.index (A controller named home.php)
Code:
<?php
class Home extends Controller {
function Home() {
parent::Controller();
$this->load->model('model_name');
}
function index() {
$this->template->load('home/home.main');
}
}
?>
Does anyone have any idea why this is happening?! If you do I would greatly appreciate your help! Thank you!
- Pianoman993