如:以下composer了workerman的mysql后使用use后,在重启终端后直接报错 Class 'workerman\mysql\Connection' not found in
<?php
use \GatewayWorker\Lib\Gateway;
use \Workerman\MySQL\Connection;
class Events
{
public static $db = null;
/*
* 初始化进程实例
* */
public static function onWorkerStart($worker)
{
self::$db = new Connection(
'47.108.144.229',
'3306',
'xiangyunyuanlin',
'yTadwjbzkhB5SJp4',
'xiangyunyuanlin'
);
}
}
加载了vendor/autoload.php 没
加载了的,也不管用额
加载了的,也不管用额
那就是workerman/db没装成功吧
去示例里面复制代码,就不会出错