test.php 494 B

1234567891011121314151617181920212223242526
  1. <?php
  2. declare (strict_types=1);
  3. namespace app\command;
  4. use app\controller\Api;
  5. use think\console\Command;
  6. use think\console\Input;
  7. use think\console\Output;
  8. class test extends Command
  9. {
  10. protected function configure()
  11. {
  12. // 指令配置
  13. $this->setName('test')
  14. ->setDescription('脚本测试');
  15. }
  16. protected function execute(Input $input, Output $output)
  17. {
  18. $res = new Api($this->app);
  19. print_r($res->upload()->getData());
  20. }
  21. }