Parsing CodeIgniter custom configuration file_PHP tutorial

WBOY
Release: 2016-07-21 15:05:29
Original
816 people have browsed it

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');

www.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: ?...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template