Extending the native Model in Codeigniter 2 - 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: Extending the native Model in Codeigniter 2 (/showthread.php?tid=38039) |
Extending the native Model in Codeigniter 2 - El Forum - 01-28-2011 [eluser]Unknown[/eluser] EDIT: Fixed - should have been in /application/core I successfully extended the Form_validation library by creating a MY_Form_validation.php in /application/libraries/ - but I can't get the same thing to work with a model. Error message: Quote:PHP Fatal error: Class 'MY_Model' not found in /Users/wt ...../application/models/gifts_model.php on line 2 Where /application/models/gifts_model.php has: Code: <?php and /application/libraries/MY_Model.php (which I've also tried putting in the /models/ directory) begins: Code: <?php I assume I've missed something stupid - any ideas? Thanks, William Extending the native Model in Codeigniter 2 - El Forum - 01-28-2011 [eluser]danmontgomery[/eluser] In 2.0, when extending core classes they must go in application/core, not application/libraries edit: Whoops, just saw you figured this out |