40 lines
748 B
PHP
40 lines
748 B
PHP
<?php
|
|
namespace app\commands\tasks;
|
|
|
|
use Yii;
|
|
use yii\console\Controller;
|
|
use yii\console\ExitCode;
|
|
|
|
class TestController extends Controller
|
|
{
|
|
/**
|
|
* @return int Exit code
|
|
*/
|
|
public function actionIndex()
|
|
{
|
|
sleep(1);
|
|
echo "我是index方法\n";
|
|
return ExitCode::OK;
|
|
}
|
|
|
|
/**
|
|
* @return int Exit code
|
|
*/
|
|
public function actionTest()
|
|
{
|
|
sleep(2);
|
|
echo "我是test方法\n";
|
|
return ExitCode::OK;
|
|
}
|
|
|
|
public function actionCeshi(){
|
|
// file_put_contents('test.txt',111, FILE_APPEND);
|
|
return ExitCode::OK;
|
|
}
|
|
|
|
public function actionDemo(){
|
|
|
|
file_put_contents('test.txt',111, FILE_APPEND);
|
|
return ExitCode::OK;
|
|
}
|
|
} |