loading model from controller subfolder - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: loading model from controller subfolder (/showthread.php?tid=15006) |
loading model from controller subfolder - El Forum - 01-23-2009 [eluser]PermanaJ[/eluser] I've got one problem .. I have a create a folder in controller folder, then I add a controller file. From there, I load a model in models folder ... and there are some error I have search in forum about controller/model with subfolder but it didn't solve my problem .. ohh, here's the code application/library/MY_Model.php Code: <?php application/models/muser.php Code: class MUser extends MY_Model{ application/controller/user/account.php Code: /** And here's the error message : A PHP Error was encountered Severity: Notice Message: Undefined property: Account::$MUser Filename: user/account.php Line Number: 31 Fatal error: Call to a member function read() on a non-object in D:\CodeIgniter\Test\system\application\controllers\user\account.php on line 31 Why this error happen? I think there are any problem with creating folder inside controller folder ... loading model from controller subfolder - El Forum - 01-27-2009 [eluser]bd3521[/eluser] Try using Muser instead of MUser? |