优化数据库连接错误提示

This commit is contained in:
wenquan
2020-04-11 17:53:38 +08:00
parent 40db18262c
commit 4f9a252e3b
+1
View File
@@ -29,6 +29,7 @@ function funException($e) {
$error['file'] = $e->getFile();
$error['line'] = $e->getLine();
}
echo($error['message'].$error['file']." 第 ".$error['line']." 行.\r\n".$e->getTraceAsString()."\r\n");
$db->posterror($error['message'].$error['file']." 第 ".$error['line']." 行.\r\n".$e->getTraceAsString(),'warning');
}
set_error_handler('funError');