model not loading :( - 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: model not loading :( (/showthread.php?tid=1713) |
model not loading :( - El Forum - 06-21-2007 [eluser]Unknown[/eluser] Hi everyone. I'm having a problem getting a model to load. I'm getting this error: Code: A PHP Error was encountered And here is my Controller Code: <?php Thanks. Any idea model not loading :( - El Forum - 06-21-2007 [eluser]Unknown[/eluser] Well, it looks like I can't load a model within the constructor. Is there anyway to have a callback like "beforeFilter" in cakePhp? Thanks again. model not loading :( - El Forum - 06-22-2007 [eluser]Bulk[/eluser] I don't know if you just left it out for brevity, or if you left it out of the actual code, but you need a constructor function that calls the contructor for the "Controller" class - or the global classes won't get attached, eg: Code: function User() |