how i can have a master Controller???I don't know |
I know CI has a main object that i can access using get_instance, but is it possible that run other controllers through one main controller?
we can use routing role to route all requests to Main_controller/Main_method, but in that method, how i can execute requested controllers? wiredesignz HMVC has Modules::Run method, but is there a better way?
Create a file called MY_Controller.php and put it in your application/core directory. Inside should be a class MY_Controller that extends CI_Controller. The class constructor should call parent::__construct();
Next, alter your controllers so they extend MY_Controller, not CI_Controller. That's it. |
Welcome Guest, Not a member yet? Register Sign In |