yii学习笔记--配置文件的配置

 1 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
 2     'name'=>'My Web Application',//项目的名称
 3 
 4     // preloading 'log' component
 5     'preload'=>array('log'),
 6 
 7     // autoloading model and component classes
 8     'import'=>array(
 9         'application.models.*',//导入application/models文件夹所哟模型类
10         'application.components.*',
11     ),
12 
13     'modules'=>array(
14         // uncomment the following to enable the Gii tool
15        
16         'gii'=>array(
17             'class'=>'system.gii.GiiModule',
18             'password'=>'123456',
19             // If removed, Gii defaults to localhost only. Edit carefully to taste.
20             'ipFilters'=>array('127.0.0.1','::1'),
21         ),
22        //gii的配置 可以帮助我们快速创建控制器
23     ),'
24     db'=>array(//数据库的配置
25             'connectionString' => 'mysql:host=localhost;        dbname=testdrive',
26             'emulatePrepare' => true,
27             'username' => 'root',
28             'password' => '',
29             'charset' => 'utf8',
30         ),    

 

posted @ 2014-09-01 22:22  闲云-野鹤  阅读(203)  评论(0编辑  收藏  举报