<?php
//yiiapp/protected/config/main.php 项目控制台应用程序的配置文件
// This is the configuration for yiic console application.
// Any writable CConsoleApplication properties can be configured here.
// 这是yiic的控制台应用程序的配置。
// 任何可写CConsoleApplication属性可以配置在这里。
// 意思这里是可以从控制台直接执行这执行语句的?
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..', //
'name'=>'My Console Application',
// preloading 'log' component
'preload'=>array('log'),
// application components
'components'=>array(
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),
// uncomment the following to use a MySQL database
/*
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=testdrive',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
),
*/
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
),
),
),
);