![]() |
Extends Controller Problem - 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: Extends Controller Problem (/showthread.php?tid=42609) |
Extends Controller Problem - El Forum - 06-13-2011 [eluser]Sarwar CSE[/eluser] I have a controller name system which is extend MYController from core, and i want to extend it from two controller name adminpanel and user panal. like Code: //file Path: application/controller/system.php Quote:the url "http://localhost/test/index.php/userpanel/ShowWelcomeMessage" shows this error Please Advice me..... Extends Controller Problem - El Forum - 06-13-2011 [eluser]InsiteFX[/eluser] The MY_Controller has to go in application/core/MY_Controller.php Extends Controller Problem - El Forum - 06-13-2011 [eluser]Sarwar CSE[/eluser] The MY_Controller has already in application/core/MY_Controller.php Quote:My question is that is this possible In the file application/controller/adminpanel.php extends system without using Code: //file Path: application/controller/adminpanel.php Extends Controller Problem - El Forum - 06-13-2011 [eluser]danmontgomery[/eluser] Yes. Only files with the prefix you have defined in config.php (defaults to MY_) are automatically included. If you want to extend another controller, you would have to use autoload or include the file yourself. Extends Controller Problem - El Forum - 06-13-2011 [eluser]InsiteFX[/eluser] Here the Autoloader that noctrum is talking about! Code: /* InsiteFX |