console.conf.php 需要import 'application.controllers.*'然后 <?php class OrangeCommand extends CConsoleCommand { public function run($args) { $siteController = new SiteController('site'); $siteController->actionReadexcel(); }
}<?phpclass SiteController extends CController { public function actionReadexcel() { echo 'check'; }
console.conf.php 需要import 'application.controllers.*'然后
<?php
class OrangeCommand extends CConsoleCommand
{
public function run($args)
{
$siteController = new SiteController('site'); $siteController->actionReadexcel();
}
}<?phpclass SiteController extends CController
{
public function actionReadexcel()
{
echo 'check';
}
}调用