代码如下:
namespace app\admin\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class Task extends Command{
protected function configure(){
$this->setName('Task')->setDesc
}
protected function execute(Input $input, Output $output)
{
//这里写业务逻辑
$output->writeln("Bingo!");
}
}
执行结果:

但是,我再其他文件夹下,用绝对路径执行程序的时候,就出错了:如图!

最佳答案
