![]() |
Autoload model in a subfolder - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Autoload model in a subfolder (/showthread.php?tid=28511) |
Autoload model in a subfolder - El Forum - 03-13-2010 [eluser]goldpelican[/eluser] Should this work? When I load a model in a subfolder in a controller, this works: Code: $this->load->model('blog/post_model'); But if I try to autoload the model in a subfolder, this doesn't work: Code: $autoload['model'] = array('blog/post_model'); I can autoload models directly under the models/ folder, but not in a subfolder under this. I'm using subfolders under controllers, models and views to organise an application's frontend and backend functionality, and was planning to use autoloading of models, but it's not working for me. Autoload model in a subfolder - El Forum - 12-06-2010 [eluser]emurad[/eluser] Same problem here. What's wrong? |