![]() |
Modular Separation - PHP5 (Modules) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Modular Separation - PHP5 (Modules) (/showthread.php?tid=20208) |
Modular Separation - PHP5 (Modules) - El Forum - 11-16-2010 [eluser]Keat Liang[/eluser] here is my codes, i made a simple example, Code: /application/modules/welcome/controllers/welcome.php tested with follow link with no problem Code: index.php/welcome here is the code Code: <?php problem start here from another module Code: /application/modules/hello/controllers/hello.php here is the controller code Code: class hello extends Controller when i try to extend MX_Controller Code: class hello extends MX_Controller and i get this..... Code: Call to undefined method MX_Controller::MX_Controller() one more question if i wanna use this Extension, can i still using Base controller similar to MY_Controller ? MY_Controller.php i try modify to this Code: <?php (defined('BASEPATH')) OR exit('No direct script access allowed'); then the controller extends from MY_Controller not working too... i try everything i know still nothing come out. any help will be appreciated. sorry for my bad english. Modular Separation - PHP5 (Modules) - El Forum - 11-16-2010 [eluser]wiredesignz[/eluser] @Keat Liang, Your controllers must extend the MX_Controller class. Modular Separation - PHP5 (Modules) - El Forum - 11-16-2010 [eluser]Keat Liang[/eluser] [quote author="wiredesignz" date="1289934832"]@Keat Liang, Your controllers must extend the MX_Controller class.[/quote] i get this when i did that (any link or functions) Code: Fatal error: Call to undefined method MX_Controller::MX_Controller() in D:\EasyPHP-5.3.3.1\www\HMVC\application\modules\hello\controllers\hello.php on line 8 welcome.php Code: <?php hello.php Code: <?php anything i done wrong ? Modular Separation - PHP5 (Modules) - El Forum - 11-16-2010 [eluser]wiredesignz[/eluser] Use PHP5 constructors. Code: <?php Modular Separation - PHP5 (Modules) - El Forum - 11-16-2010 [eluser]Keat Liang[/eluser] [quote author="wiredesignz" date="1289935869"]Use PHP5 constructors.[/quote] YAY !!! thx it's working, thanks a lot man ! thanks for patient with me. one more question. i can get this work under hello.php Code: function withlib3() when i made some changes to test the example given in bitbucket wiki like the following Code: function withlib3() i get this error Code: A PHP Error was encountered Modular Separation - PHP5 (Modules) - El Forum - 11-16-2010 [eluser]wiredesignz[/eluser] The Bitbucket wiki example was incorrect and has been updated. Modular Separation - PHP5 (Modules) - El Forum - 11-16-2010 [eluser]Keat Liang[/eluser] [quote author="wiredesignz" date="1289977414"]The Bitbucket wiki example was incorrect and has been updated.[/quote] Everything working ! thumbs up !, Wiki is updated YAY!!! hope it help others too. :lol: Modular Separation - PHP5 (Modules) - El Forum - 11-19-2010 [eluser]umefarooq[/eluser] hi im trying Modular extension with CI2 but getting this error Code: Fatal error: Class 'CI_Controller' not found in C:\AppServ\www\ci2\application\third_party\MX\Ci.php on line 40 Modular Separation - PHP5 (Modules) - El Forum - 11-19-2010 [eluser]wiredesignz[/eluser] CI 2.0 has been altered to use a CI_Controller class. Modular Separation - PHP5 (Modules) - El Forum - 11-21-2010 [eluser]By AzraiL[/eluser] php 5.3.0 not working hmvc, blank page ![]() |