如何在codeigniter中更新配置文件并保存配置文件

Is there any way that we can update the value of config file and save these values into config file.

For example, I have:

   $config['base_url']  = 'http://localhost.com';
   $config['test'] = '';

I want to change the value of $config['test'] $this->config->set_item('test','something'); and save this value into config file. so, my config file should be

  $config['base_url']   = 'http://localhost.com';
  $config['test'] = 'something';

Thanks.

You might be better off using a hook that pulls this data from your database (as suggested by cchana). This way you can easily update it without compromising security of your config file.