CodeIgniter Forums

Full Version: Adding things to config.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I am wondering if its safe/best practice to add global variables to the config.php file.  Reason for this is what I am making is for multiple sites and I just want to be able to quickly change the variable in the config file or to put it elsewhere.

I'd make a new app.php file in the config folder, or something like that, and keep your custom ones there. Just protects against any framework upgrades that might change that file.
Another good option would be to create an sqlite database, and keep your app config in there. This is nice because you can easily create an admin interface to manage the settings. Config retrieval is quick and painless.