环境Thinkphp5.1命令行执行php s1.php

错误提示:PHP Fatal error: Uncaught Error: Class 'think\Console' not found in /www/***/vendor/topthink/think-worker/src/command.php:12

Stack trace:

#0 /www/***/vendor/composer/autoload_real.php(66): require()

#1 /www/***/vendor/composer/autoload_real.php(56): composerRequire29d161512c2a2356c427813fcdcc5018('ffc1d7141d4fcba...', '/www/wwwroot/tp...')

#2 /www/***/vendor/autoload.php(7): ComposerAutoloaderInit29d161512c2a2356c427813fcdcc5018::getLoader()

#3 /www/***/s1.php(26): require_once('/www/wwwroot/tp...')

#4 {main}

thrown in /www/***/vendor/topthink/think-worker/src/command.php on line 12代码 s1.php// 标记是全局启动

define('GLOBAL_START', 1);

require_once __DIR__ . '/vendor/autoload.php';

// 加载所有Applications/*/start.php,以便启动所有服务

// foreach (glob(__DIR__ . '/ws/*/start*.php') as $start_file) {

// require_once $start_file;

// }

// 运行所有服务

Worker::runAll();我的疑问

1.为什么他会报错 'think\Console' not found,我并没有调用think相关代码呀?

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐