Sometimes we need to customize configuration files in the CI framework, so how to deal with it? Here’s how to deal with it.
Configuration file config/expert.php
Copy code The code is as follows:
< ?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Expert configuration file
*
* @author xxx
* @version $Id: expert.php v 1.0 2012/5/31 14:41:00 xxx $
* @package ask.xxx.com
* @copyright 1997-2012 www.xxx.com
*/
// Expert ID
$config['expertid' ] = array('0' => '124', '1' => '81', '2' => '136');
?>
Example of getting configuration data
$this->config->load('expert', TRUE);
$expertid = $this->config->item ('expertid', 'expert');
http://www.bkjia.com/PHPjc/327696.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327696.htmlTechArticleWe sometimes need to customize configuration files in the CI framework, so how to deal with it? Here’s how to deal with it. Configuration file config/expert.php Copy the code The code is as follows: ?...