CodeIgniter自定义配置文件

有时候在CI框架中需要自定义配置文件

配置文件config/myconfig.php

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

// 专家ID
$config['test'] = array('0' => '124', '1' => '81', '2' => '136');

?>

 

获取配置数据示例
 $this->config->load('myconfig', TRUE);
 $test 
= $this->config->item('test', 'myconfig');

 

posted @ 2013-01-18 09:36  kwishly  阅读(404)  评论(0编辑  收藏  举报