在Codeigniter中永久存储,修改和加载“配置变量”

I need to change and load permanently a set of variables in my application. Global configuration variables that will set my environment.

For what i have seen, i can create a config file and change it through a post form in my backoffice but it won't be persistent.

What is the best way to change and access "configuration data" without using a database and query it all the time?

In Codeigniter we can added any number of config variables for the site. Follow the step to add and retrieve the value of custom added config variable.

  1. Define the config variables in config.php in ‘application/config’ folder

    $config['config_variable1'] = 'Config value 1';

  2. To get these values in the view files located in ‘application/views’

Refer this office link of CodeIgniter for further reference, Config Class