tp5.1 启动报错
Opened this issue · 0 comments
hbh112233abc commented
windows系统启动php think work:server
报错信息如下:
[think\exception\ErrorException] Cannot use Workerman\Worker as Worker because the name is already in use
解决办法:
找到目录:
\vendor\topthink\think-worker\src\command\Server.php
找到命名空间:
use Workerman\Worker;
修改为:
use Workerman\Worker as Worker2;
紧接着修改 119 行与 126的 worker 改为 Worker2
找到目录:
\vendor\topthink\think-worker\src\command\GatewayWorker.php
找到命名空间
use Workerman\Worker;
修改为:
use Workerman\Worker as Worker3;
linux centos系统没有以上错误