From d10b2bc89980cdcf6e1eb7882423756708f3548a Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 30 Aug 2016 11:50:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Btrace=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/debug/Console.php | 2 +- library/think/debug/Html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/debug/Console.php b/library/think/debug/Console.php index 1763fc66..8a232c8c 100644 --- a/library/think/debug/Console.php +++ b/library/think/debug/Console.php @@ -54,7 +54,7 @@ class Console } // 获取基本信息 $runtime = number_format(microtime(true) - THINK_START_TIME, 10); - $reqs = number_format(1 / $runtime, 2); + $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; $mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2); if (isset($_SERVER['HTTP_HOST'])) { diff --git a/library/think/debug/Html.php b/library/think/debug/Html.php index 1061b372..f8651aa9 100644 --- a/library/think/debug/Html.php +++ b/library/think/debug/Html.php @@ -54,7 +54,7 @@ class Html } // 获取基本信息 $runtime = number_format(microtime(true) - THINK_START_TIME, 10); - $reqs = number_format(1 / $runtime, 2); + $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; $mem = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2); // 页面Trace信息