加载扩展配置

Posted indifferent

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了加载扩展配置相关的知识,希望对你有一定的参考价值。

1.在Application/Home/Conf目录下新建 xxx.php,文件,内容如下:

 /**  xxx.php */

return array(

        arrray(

          ‘id‘=>1,

         ‘username‘=>‘root‘          

     ),

     array(

        ‘id‘=>2,

        ‘username‘=>‘test‘

     )

);

2.在同级的Config.php里编辑

  ‘LOAD_EXT_CONFIG‘=>array(‘ADMIN"=>‘xxx‘)

3.在controller/IndexController.class.php的方法里访问 

  print_r(C(‘ADMIN‘));

以上是关于加载扩展配置的主要内容,如果未能解决你的问题,请参考以下文章