When I want to see a project in php and put in the browser localhost / viveamazonas (vive amazonas is the folder where I have the project files) the following error is displayed:
Fatal error: Uncaught Error: Class 'Testimonials' not found in C: \ xampp \ htdocs \ ViveAmazonas \ system \ core \ Loader.php: 303 Stack trace: # 0 C: \ xampp \ htdocs \ ViveAmazonas \ application \ controllers \ main.php (29): CI_Loader-> model ('Testimonials') # 1 C: \ xampp \ htdocs \ ViveAmazonas \ system \ core \ CodeIgniter.php (308): Main-> __ construct () # 2 C: \ xampp \ htdocs \ ViveAmazonas \ index.php (202): require_once ('C: \ xampp \ htdocs ...') # 3 {main}
thrown in C: \ xampp \ htdocs \ ViveAmazonas \ system \ core \ Loader.php on line 303
This is my code:
[load->database(); } function getTestimonios(){
$this->db->from('testimonios');
$response = $this->db->get();
if ($response->num_rows() > 0) {
return $response->result_array();
}else{ return 0; }
} function getLastTestimonio(){
$this->db->from('testimonios');
$this->db->order_by('id_testimonio', 'desc');
$this->db->limit(1);
$response = $this->db->get();
if ($response->num_rows() > 0) {
return $response->result_array();
}else{ return 0; }
} function getTestimoniosById($id_testimonio){ $this->db->from('testimonios');
$this->db->where('id_testimonio', $id_testimonio);
$response = $this->db->get(); if ($response->num_rows() > 0) { return $response->result_array();
}else{ return 0; }
} function modifyTestimonio($id_testimonio, $data){
$this->db->where('id_testimonio', $id_testimonio);
return $this->db->update('testimonios', $data);
} function setTestimonio($data){
$this->db->insert('testimonios', $data);
} function deleteTestimonio($id_testimonio){
$this->db->where('id_testimonio',$id_testimonio);
if($this->db->delete('testimonios')){
return 1; }else{ return 0; }
}
}
Error screenshot: