[newbie]Cannot load model - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10) +--- Thread: [newbie]Cannot load model (/showthread.php?tid=68246) |
[newbie]Cannot load model - pippuccio76 - 06-15-2017 HI , i try to load model in a controller function : this is my function : Code: public function prova(){ in models i have file called user_model.php : Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); http://localhost/user_codeigniter/index.php/user/prova this error appear : An uncaught Exception was encountered Type: RuntimeException Message: Unable to locate the model you have specified: User_model i do permission 755 to folder . but the error is the same RE: [newbie]Cannot load model - donpwinston - 06-15-2017 $this->load->model('user_model'); try $this->load->model('User_model'); RE: [newbie]Cannot load model - Paradinight - 06-15-2017 (06-15-2017, 04:49 PM)donpwinston Wrote: $this->load->model('user_model'); $this->load->model('user_model'); <- is correct The filename could be wrong: Change user_model.php to User_model.php RE: [newbie]Cannot load model - InsiteFX - 06-16-2017 1) PHP Code: $q = $this->db->get('user')->row(); Also make sure that when you saved the user_model that it was saved with the first letter capitalized. User_model.php RE: [newbie]Cannot load model - InsiteFX - 03-08-2018 @codenair, Do you see the date of these posts? |