...
CodeIgniter, Tutorials

how to set or get Custom Config Variables in CodeIgniter?

22 January 2019

Basically, all config variables are located at “application/config/config.php”.
Below is the way for set or get config variable.
For example,

// Setting a config variable dynamically
$this->config->set_item('variable_name', 'value');

// Getting value of config variable in Codeigniter.
$this->config->item('variable_name');

Leave a Comments