Class 'Controller' not found when creating MY_Controller using HMVC - 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: Class 'Controller' not found when creating MY_Controller using HMVC (/showthread.php?tid=38260) |
Class 'Controller' not found when creating MY_Controller using HMVC - El Forum - 02-03-2011 [eluser]Isern Palaus[/eluser] Hello, I'm trying to create a MY_Controller to extend it with my Controllers and I can't get it working. I asked this for 1.7.2 and problem was that I wasn't using the __autoload() suggested by Phil on his blog but I assumed that this will work without his patch on 2.0. I tried and fails, I tried with adding the function __construct() on config.php and doesn't works. I'm using the last source version of HMVC (from bitbucket) by wiredesignz. /application/core/MY_Controller.php Code: <?php (defined('BASEPATH')) OR exit('No direct script access allowed'); I also tried parent::__construct(); Error: Quote:Fatal error: Class 'Controller' not found in /home/*****/****/trunk/src/application/core/MY_Controller.php on line 3 Thank you in advance Class 'Controller' not found when creating MY_Controller using HMVC - El Forum - 02-03-2011 [eluser]moodh[/eluser] extends CI_Controller Class 'Controller' not found when creating MY_Controller using HMVC - El Forum - 02-03-2011 [eluser]Isern Palaus[/eluser] [quote author="narcisha" date="1296762271"]extends CI_Controller[/quote] Tried: Call to undefined method CI_Controller::ci_controller() Class 'Controller' not found when creating MY_Controller using HMVC - El Forum - 02-03-2011 [eluser]moodh[/eluser] [quote author="Isern Palaus" date="1296762442"][quote author="narcisha" date="1296762271"]extends CI_Controller[/quote] Tried: Call to undefined method CI_Controller::ci_controller()[/quote] lala extends CI_Controller { function __construct() { parent::__construct(); } } Class 'Controller' not found when creating MY_Controller using HMVC - El Forum - 02-03-2011 [eluser]Isern Palaus[/eluser] [quote author="narcisha" date="1296762519"][quote author="Isern Palaus" date="1296762442"][quote author="narcisha" date="1296762271"]extends CI_Controller[/quote] Tried: Call to undefined method CI_Controller::ci_controller()[/quote] lala extends CI_Controller { function __construct() { parent::__construct(); } }[/quote] It work! Thank you! |