2
有什么方法可以更新配置文件的值并将这些值保存到配置文件中。如何更新codeigniter中的配置文件并保存配置文件
例如,我有:
$config['base_url'] = 'http://localhost.com';
$config['test'] = '';
我想改变$配置[ '测试']的值 $这 - > config-> set_item( '测试', '某物'); 并将此值保存到配置文件中。所以,我的配置文件应该是
$config['base_url'] = 'http://localhost.com';
$config['test'] = 'something';
谢谢。
** $ this-> config-> set_item('test','something'); **会在运行时将'test'的值设置为'something'。您不需要**再次保存**。运行时为 – 2012-08-10 06:29:29
,可以。但如果我想保存该文件。可能吗? – Sml004 2012-08-10 06:31:21
你可以但我想知道为什么你想这样做。例如, – 2012-08-10 06:33:12