123
$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 {