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) {
id | 31 |
think_shistory | think:["","8394-8393","9149","9124","1"] |
PHPSESSID | hvvvsg358hql8ajhfard3m8ce3 |
USER | www |
HOME | /home/www |
HTTP_COOKIE | think_shistory=think%3A%5B%22%22%2C%228394-8393%22%2C%229149%22%2C%229124%22%2C%221%22%5D; PHPSESSID=hvvvsg358hql8ajhfard3m8ce3 |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_ACCEPT | */* |
HTTP_HOST | www.hnjkjm.com |
HTTP_USER_AGENT | Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | hnjkjm.com |
SERVER_PORT | 80 |
SERVER_ADDR | 172.26.175.130 |
REMOTE_PORT | 35798 |
REMOTE_ADDR | 173.232.242.50 |
SERVER_SOFTWARE | nginx/1.19.8 |
GATEWAY_INTERFACE | CGI/1.1 |
REQUEST_SCHEME | http |
SERVER_PROTOCOL | HTTP/1.1 |
DOCUMENT_ROOT | /www/wwwroot/hnjkjm.com/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /down_file?id=31 |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=//down_file&id=31 |
SCRIPT_FILENAME | /www/wwwroot/hnjkjm.com/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1674906402.9162 |
REQUEST_TIME | 1674906402 |
IF_PUBLIC | true |
ROOT_PATH | /www/wwwroot/hnjkjm.com/public/../ |
APP_PATH | /www/wwwroot/hnjkjm.com/public/../application/ |
DS | / |
ADDON_PATH | /www/wwwroot/hnjkjm.com/public/../addons/ |
ROOT_URL | / |
TEMPLATE_PATH | /www/wwwroot/hnjkjm.com/public/../templates/ |
PINYIN_DEFAULT | 4096 |
PINYIN_TONE | 2 |
PINYIN_NO_TONE | 4 |
PINYIN_ASCII_TONE | 8 |
PINYIN_NAME | 16 |
PINYIN_KEEP_NUMBER | 32 |
PINYIN_KEEP_ENGLISH | 64 |
PINYIN_UMLAUT_V | 128 |
PINYIN_KEEP_PUNCTUATION | 256 |