相应的扩展也是打开的,重启了服务还是一样提示
could not find driver
- $this->fetchType = $config['result_type'];
- }
- try {
- if (empty($config['dsn'])) {
- $config['dsn' = $this->parseDsn($config);
- }
- if ($config['debug']) {
- $startTime = microtime(true);
- }
- $this->links[$linkNum = new PDO($config['dsn'], $config['username'], $config['password'], $params);
- if ($config['debug']) {
- // 记录数据库连接信息
- Log::record('[ DB ] CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn'], 'sql');
- }
- } catch (\PDOException $e) {
- if ($autoConnection) {
- Log::record($e->getMessage(), 'error');
- return $this->connect($autoConnection, $linkNum);
- } else {
|