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 |
HTTP_REFERER | |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html) |
HTTP_HOST | www.videochaterotico.net |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | www.videochaterotico.net |
SERVER_PORT | 80 |
SERVER_ADDR | 10.0.12.12 |
REMOTE_PORT | 35866 |
REMOTE_ADDR | 43.230.168.250 |
SERVER_SOFTWARE | nginx/1.22.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REQUEST_SCHEME | http |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /www/wwwroot/www.videochaterotico.net |
DOCUMENT_URI | /index.php |
REQUEST_URI | /news/75-44.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/news/75-44.html |
SCRIPT_FILENAME | /www/wwwroot/www.videochaterotico.net/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1715875611.9102 |
REQUEST_TIME | 1715875611 |