优化数据库连接错误提示

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