CI_model not found - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: CI_model not found (/showthread.php?tid=68777) |
CI_model not found - jophof007 - 08-24-2017 Because of my previous issue trying to load classes within a controller I started to use models in my code. One thing I am puzzled with how can I share my toolkit. Now I have everything inherited from the top class which is a child of CI_controller. When I start inheriting form CI_model I must duplicate my general purpose code. The main issue is this: Fatal error: Class 'CI_Model' not found in /Applications/MAMP/htdocs/b4y_v20ez/application/models/Ezbuild_main_model.php on line 10 The code is like this: PHP Code: [color=#000000][size=medium][font=Times]class Ezbuild_main_model extends CI_Model { I checked the file and classname. I hope for some help. John RE: CI_model not found - InsiteFX - 08-24-2017 Try creating a MY_Model in ./application/core that extends the CI_Model then extend your Models from the MY_Model You need to sit down and read the CodeIgniter Users Guide. |