CodeIgniter Forums
How to access the config file of parent controller from sub controller - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: How to access the config file of parent controller from sub controller (/showthread.php?tid=72874)



How to access the config file of parent controller from sub controller - SpeedRacer - 02-22-2019

Hi Team,

Can someone guide me to access the configuration file of parent controller from the sub controllers? 

also how to use the DB configuration file from parent for the sub controllers? so that i need to maintain only one config file. 

Thanks in advance.


RE: How to access the config file of parent controller from sub controller - php_rocs - 02-22-2019

@SpeedRacer,

Maybe these links will help you:
https://www.codeigniter.com/user_guide/libraries/config.html?highlight=config#manual-loading
https://www.codeigniter.com/user_guide/tutorial/news_section.html#display-the-news