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) {
PHPSESSID | cuq33vrbdtb1t50va75totvnk0 |
USER | www |
HOME | /home/www |
FCGI_ROLE | RESPONDER |
REDIRECT_STATUS | 200 |
proxy-nokeepalive | 1 |
HTTP_USER_AGENT | Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) |
HTTP_HOST | www.zhengbang.com |
HTTP_ACCEPT | */* |
HTTP_COOKIE | PHPSESSID=cuq33vrbdtb1t50va75totvnk0 |
HTTP_ACCEPT_CHARSET | utf-8 |
CONTENT_LENGTH | 0 |
CONTENT_TYPE | application/x-www-form-urlencoded |
PATH | /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin |
LD_LIBRARY_PATH | /www/server/apache/lib |
SERVER_SIGNATURE | <address>Apache Server at www.zhengbang.com Port 80</address> |
SERVER_SOFTWARE | Apache |
SERVER_NAME | www.zhengbang.com |
SERVER_ADDR | 211.149.224.47 |
SERVER_PORT | 80 |
REMOTE_ADDR | 45.158.221.134 |
DOCUMENT_ROOT | /www/wwwroot/zbjt/public |
REQUEST_SCHEME | http |
CONTEXT_PREFIX | |
CONTEXT_DOCUMENT_ROOT | /www/wwwroot/zbjt/public |
SERVER_ADMIN | webmaster@example.com |
SCRIPT_FILENAME | /www/wwwroot/zbjt/public/index.php |
REMOTE_PORT | 58008 |
REDIRECT_URL | /news/show/index.html |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | //news/show/index.html |
SCRIPT_NAME | /index.php |
PATH_INFO | /news/show/index.html |
PATH_TRANSLATED | redirect:/index.php/news/show/index.html/show/index.html |
PHP_SELF | /index.php/news/show/index.html |
REQUEST_TIME_FLOAT | 1610550700.3799 |
REQUEST_TIME | 1610550700 |