December 2013
Intermediate to advanced
306 pages
6h 26m
English
It's a great idea to have configuration settings in the same file—the benefits are obvious—so rather than having settings hidden in controllers, modules, helpers, libraries, or (God forbid) in views, you can put them in one location and refer to them from there. CodeIgniter comes with its own configuration files in the config folder; however, you can add your own files to the config folder and refer to them in your code. It's pretty handy and easy to do; let's take a look.
We're going to create the following two files:
/path/to/codeigniter/application/controllers/config_settings.php/path/to/codeigniter/application/config/my_config_file.phpconfig_settings.php controller, ...Read now
Unlock full access