本文实例讲述了Yii实现Command任务处理的方法。分享给大家供大家参考,具体如下:
1.配置,执行任务所需要的组件
任务配置文件:/protected/config/console.php
配置方法跟配置main文件差不多
<?php
// This is the configuration for yiic console application.
// Any writable CConsoleApplication properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIR