<?php
return [
'app\home\command\Test',
];第二步,建立命令类文件,新建application/home/command/Test.php<?php
namespace app\home\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
class Test extends Command
{
protected function configure()
{
$this->setName('test')->setDescription('Here is the remark ');
}
protected function execute(Input $input, Output $output)
{
$output->writeln("TestCommand:");
}
}步骤都是照着官方文档做的Windows下cmd命令执行为甚会执行不了
D:\WWW\tjqb>php think Test
[InvalidArgumentException]
Command "Test" is not defined.
请大神指点一下
最佳答案