如何更改控制器中的配置项的值? - Codeigniter [英] How to change the value of a config item in the controller? - Codeigniter
本文介绍了如何更改控制器中的配置项的值? - Codeigniter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个配置文件: application / config / breadcrumbs.php
以下配置项:
$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
这篇关于如何更改控制器中的配置项的值? - Codeigniter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文