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']) {
// 记录数据库连接信息
$this->log('[ DB ] CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn']);
}
return $this->links[$linkNum];
} catch (\PDOException $e) {
if ($autoConnection) {
USER | www |
HOME | /home/www |
FCGI_ROLE | RESPONDER |
SCRIPT_FILENAME | /www/wwwroot/hbcxzc.com/enpc/public/index.php |
QUERY_STRING | |
REQUEST_METHOD | GET |
CONTENT_TYPE | |
CONTENT_LENGTH | |
SCRIPT_NAME | /enpc/public/index.php |
REQUEST_URI | /enpc/public/index.php/home/abouts/contnctus.html |
DOCUMENT_URI | /enpc/public/index.php/home/abouts/contnctus.html |
DOCUMENT_ROOT | /www/wwwroot/hbcxzc.com |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_SCHEME | http |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_SOFTWARE | nginx/1.22.1 |
REMOTE_ADDR | 18.234.232.228 |
REMOTE_PORT | 51568 |
SERVER_ADDR | 192.168.2.88 |
SERVER_PORT | 80 |
SERVER_NAME | hbcxzc.com |
REDIRECT_STATUS | 200 |
PATH_INFO | /home/abouts/contnctus.html |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_HOST | hbcxzc.com |
PHP_SELF | /enpc/public/index.php/home/abouts/contnctus.html |
REQUEST_TIME_FLOAT | 1711672545.4502 |
REQUEST_TIME | 1711672545 |
__PHYSICS__ | /www/wwwroot/hbcxzc.com/enpc |