I want to set up my first project in CodeIgniter which includes a database. I've made the proper configurations for database like shown in this tutorial: Everything You Need to Get Started With CodeIgniter.
I have created my database in phpMyadmin. When try to access the project in my localhost this is the error: After changing password from 'root' to ' ' now the error is this:
Fatal error: Class 'Model' not found in C:\xampp\htdocs\ci\application\models\diploma_model.php on line 2
This is my model cpde:
<?php
class diploma_model extends Model {
function diploma_model()
{
// Call the Model constructor
parent::Model();
}
function getData()
{
//Query the data table for every record and row
$query = $this->db->get('data');
if ($query->num_rows() > 0)
{
//show_error('Database is empty!');
}else{
return $query->result();
}
}
}
?>
Im new at codeIgniter. Can someone explain why this error occurs? Thanks!
</div>