oz1cz
oz1cz

Reputation: 5844

Loading controllers from different folder in CodeIgniter

In CodeIgniter, I can use $autoload['packages'] to specify additional locations for libraries, models, and helpers. But how do I specify additional locations for controllers.

What I want is this: If a URL specifies controller xyzzy, CodeIgniter should first look for the usual application/controllers/Ctrl_xyzzy.php file, and if it doesn't find it, it should look for other_place/controllers/Ctrl_xyzzy.php instead.

Is that possible?

Upvotes: 0

Views: 334

Answers (1)

Shibon
Shibon

Reputation: 1574

For calling a controller from another controller you need to use HMVC

refer this link https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc

Upvotes: 1

Related Questions