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

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10)
+--- Thread: Load two config file in one controller (/showthread.php?tid=74645)



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.