强化日志信息 仅调试模式下有效 Input类的方法支持 判断一个变量是否存在

This commit is contained in:
thinkphp
2016-01-28 14:57:30 +08:00
parent ad0b7255e4
commit 7dec0b2f9d
15 changed files with 72 additions and 20 deletions

View File

@@ -121,6 +121,8 @@ abstract class Driver
$config['dsn'] = $this->parseDsn($config);
}
$this->links[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $this->options);
// 记录数据库连接信息
APP_DEBUG && Log::record('[ DB ] CONNECT: ' . $config['dsn'], 'info');
} catch (\PDOException $e) {
if ($autoConnection) {
Log::record($e->getMessage(), 'error');