1

Im using HMVC extension in CodeIgniter. Where i have a module like

 moduleName
     config 
         config.php
         routes.php
     controller
         test.php
     models
         etc..

from test.php i was trying to load custom config item from above module folder. But its not working. im extending my class like class Test extends MX_Controller {}

I tried loading config item from default config folder which is outside the module folder and its working

According to this post, module config should load when module is initialized. But its not working.

What am i missing here?

1 Answer 1

0

Codeignitor dose not load the config from modules folder by default. Its look on application/config folder, First its look on the ENVIRONMENT folder in case you have application/config/development .....

To load the config form the module you can use

$this->load->config('../models/config/XXX.php')  

Or you have to extend the Config class to modify your way

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.