幽灵资源网 Design By www.bzswh.com
我们有时候在CI框架中需要自定义配置文件,那要怎么处理呢?下面就给你介绍处理的办法。
配置文件config/expert.php
复制代码 代码如下:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* 专家配置文件
*
* @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
*/
// 专家ID
$config['expertid'] = array('0' => '124', '1' => '81', '2' => '136');
?>
获取配置数据示例
$this->config->load('expert', TRUE);
$expertid = $this->config->item('expertid', 'expert');
配置文件config/expert.php
复制代码 代码如下:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* 专家配置文件
*
* @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
*/
// 专家ID
$config['expertid'] = array('0' => '124', '1' => '81', '2' => '136');
?>
获取配置数据示例
$this->config->load('expert', TRUE);
$expertid = $this->config->item('expertid', 'expert');
幽灵资源网 Design By www.bzswh.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
幽灵资源网 Design By www.bzswh.com
暂无评论...