在控制器也模型里面都没问题
app/command/Test.php
<?php
namespace app\command;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use think\facade\Cache;
use think\facade\Debug;
class Test extends Command
{
protected function configure()
{
// 指令配置
$this->setName('test');
// 设置参数
}
protected function execute(Input $input, Output $output)
{
Cache::store('redis')->get('test');
}
}
在cmd里面执行命令php think test报错
[BadFunctionCallException]
not support: redis
微信截图_20200303155306.png
( 5.4 KB 下载:8 次 )
最佳答案
