From 3cfd718c3808f06c377db2f33d4c3c34b45b3280 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 16 Dec 2016 14:34:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E5=91=BD=E4=BB=A4=E8=A1=8C?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=20=E6=97=A5=E5=BF=97=E5=86=99?= =?UTF-8?q?=E5=85=A5=E5=87=BA=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Request.php | 12 ++++++------ library/think/log/driver/File.php | 2 +- library/think/log/driver/Socket.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/library/think/Request.php b/library/think/Request.php index 3974d893..086e366e 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -257,7 +257,7 @@ class Request } /** - * 获取当前包含协议的域名 + * 设置或获取当前包含协议的域名 * @access public * @param string $domain 域名 * @return string @@ -274,7 +274,7 @@ class Request } /** - * 获取当前完整URL 包括QUERY_STRING + * 设置或获取当前完整URL 包括QUERY_STRING * @access public * @param string|true $url URL地址 true 带域名获取 * @return string @@ -301,7 +301,7 @@ class Request } /** - * 获取当前URL 不含QUERY_STRING + * 设置或获取当前URL 不含QUERY_STRING * @access public * @param string $url URL地址 * @return string @@ -319,7 +319,7 @@ class Request } /** - * 获取当前执行的文件 SCRIPT_NAME + * 设置或获取当前执行的文件 SCRIPT_NAME * @access public * @param string $file 当前执行的文件 * @return string @@ -351,7 +351,7 @@ class Request } /** - * 获取URL访问根地址 + * 设置或获取URL访问根地址 * @access public * @param string $url URL地址 * @return string @@ -602,7 +602,7 @@ class Request } /** - * 设置获取获取当前请求的参数 + * 获取获取当前请求的参数 * @access public * @param string|array $name 变量名 * @param mixed $default 默认值 diff --git a/library/think/log/driver/File.php b/library/think/log/driver/File.php index f9358a9d..b639fd04 100644 --- a/library/think/log/driver/File.php +++ b/library/think/log/driver/File.php @@ -63,7 +63,7 @@ class File $current_uri = "cmd:" . implode(' ', $_SERVER['argv']); } - $runtime = number_format(microtime(true) - THINK_START_TIME, 10); + $runtime = round(microtime(true) - THINK_START_TIME, 10); $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; $time_str = ' [运行时间:' . number_format($runtime, 6) . 's][吞吐率:' . $reqs . 'req/s]'; $memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2); diff --git a/library/think/log/driver/Socket.php b/library/think/log/driver/Socket.php index cc4a8e12..018c211b 100644 --- a/library/think/log/driver/Socket.php +++ b/library/think/log/driver/Socket.php @@ -65,7 +65,7 @@ class Socket } $trace = []; if (App::$debug) { - $runtime = number_format(microtime(true) - THINK_START_TIME, 10); + $runtime = round(microtime(true) - THINK_START_TIME, 10); $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; $time_str = ' [运行时间:' . number_format($runtime, 6) . 's][吞吐率:' . $reqs . 'req/s]'; $memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);