CodeIgniter Forums
Load two config file in one controller - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Model-View-Controller (https://forum.codeigniter.com/forum-10.html)
+--- Thread: Load two config file in one controller (/thread-74645.html)



Load two config file in one controller - pippuccio76 - 10-19-2019

Can i load 2 config file in one controller in the construct simultaneously?



RE: Load two config file in one controller - dave friend - 10-19-2019

Simultaneously implies at the same moment and you cannot do anything "at the same moment" in PHP.

But you can load multiple config files, it just has to be done one at a time.
For example:

$this->config->load('some_config');
$this->config->load('other_config');

Read the Config Class documentation for loads of ways to use config files.