mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
数据库和缓存读写计数调整 增加页面Trace日志驱动(需要设置'response_exit'=>false) Log::record方法支持字符串之外的变量输出
This commit is contained in:
@@ -20,6 +20,10 @@ class Db
|
||||
private static $instance = [];
|
||||
// 当前数据库连接实例
|
||||
private static $_instance = null;
|
||||
// 查询次数
|
||||
public static $queryTimes = 0;
|
||||
// 执行次数
|
||||
public static $executeTimes = 0;
|
||||
|
||||
/**
|
||||
* 取得数据库类实例
|
||||
@@ -55,8 +59,8 @@ class Db
|
||||
if (empty($config)) {
|
||||
$config = Config::get('database');
|
||||
if (Config::get('use_db_switch')) {
|
||||
$status = Config::get('app_status');
|
||||
$config = $config[$status?:'default'];
|
||||
$status = Config::get('app_status');
|
||||
$config = $config[$status ?: 'default'];
|
||||
}
|
||||
}
|
||||
if (is_string($config)) {
|
||||
|
||||
Reference in New Issue
Block a user