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/shop.com/public/index.php |
QUERY_STRING | s=/goods-102.html |
REQUEST_METHOD | GET |
CONTENT_TYPE | |
CONTENT_LENGTH | |
SCRIPT_NAME | /index.php |
REQUEST_URI | /goods-102.html |
DOCUMENT_URI | /index.php |
DOCUMENT_ROOT | /www/wwwroot/shop.com/public |
SERVER_PROTOCOL | HTTP/2.0 |
REQUEST_SCHEME | https |
HTTPS | on |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_SOFTWARE | nginx/1.22.1 |
REMOTE_ADDR | 34.228.188.171 |
REMOTE_PORT | 38784 |
SERVER_ADDR | 172.31.191.215 |
SERVER_PORT | 443 |
SERVER_NAME | shop.com |
REDIRECT_STATUS | 200 |
PATH_INFO | |
HTTP_HOST | shop.izk3d.com |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711856.3939 |
REQUEST_TIME | 1711711856 |
APPLICATION_VERSION | v1.8.0 |
DS | / |
__MY_HTTP__ | https |
__MY_ROOT__ | |
__MY_ROOT_PUBLIC__ | / |
__MY_HOST__ | shop.izk3d.com |
__MY_URL__ | https://shop.izk3d.com/ |
__MY_PUBLIC_URL__ | https://shop.izk3d.com/ |
__MY_VIEW_URL__ | https://shop.izk3d.com/goods-102.html |
ROOT_PATH | /www/wwwroot/shop.com/public/ |
ROOT | /www/wwwroot/shop.com/ |
APP_PATH | /www/wwwroot/shop.com/application/ |
APPLICATION | web |
APPLICATION_CLIENT_TYPE | pc |
IS_AJAX | false |