如何更改控制器中配置项的值?- 代码点火器 [英] How to change the value of a config item in the controller? - Codeigniter
本文介绍了如何更改控制器中配置项的值?- 代码点火器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个配置文件:application/config/breadcrumbs.php
在文件中我有以下配置项:
Within the file I have the following configuration item:
$config['hide_number'] = TRUE;
如何通过控制器更改此配置项的值.
How can I change the value of this config item through the controller.
我只需要更改此配置项的值一次.这是怎么做的???
I need to change the value of this config item one time only. How is this done???
推荐答案
$this->config->load('breadcrumbs');
$this->config->set_item('hide_number', 'your value');
查看文档了解更多信息:
See the docs for more info:
http://codeigniter.com/user_guide/libraries/config.html
这篇关于如何更改控制器中配置项的值?- 代码点火器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文