mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进命令行模式下 日志写入出错的问题
This commit is contained in:
@@ -257,7 +257,7 @@ class Request
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前包含协议的域名
|
* 设置或获取当前包含协议的域名
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $domain 域名
|
* @param string $domain 域名
|
||||||
* @return string
|
* @return string
|
||||||
@@ -274,7 +274,7 @@ class Request
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前完整URL 包括QUERY_STRING
|
* 设置或获取当前完整URL 包括QUERY_STRING
|
||||||
* @access public
|
* @access public
|
||||||
* @param string|true $url URL地址 true 带域名获取
|
* @param string|true $url URL地址 true 带域名获取
|
||||||
* @return string
|
* @return string
|
||||||
@@ -301,7 +301,7 @@ class Request
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前URL 不含QUERY_STRING
|
* 设置或获取当前URL 不含QUERY_STRING
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $url URL地址
|
* @param string $url URL地址
|
||||||
* @return string
|
* @return string
|
||||||
@@ -319,7 +319,7 @@ class Request
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前执行的文件 SCRIPT_NAME
|
* 设置或获取当前执行的文件 SCRIPT_NAME
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $file 当前执行的文件
|
* @param string $file 当前执行的文件
|
||||||
* @return string
|
* @return string
|
||||||
@@ -351,7 +351,7 @@ class Request
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取URL访问根地址
|
* 设置或获取URL访问根地址
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $url URL地址
|
* @param string $url URL地址
|
||||||
* @return string
|
* @return string
|
||||||
@@ -602,7 +602,7 @@ class Request
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置获取获取当前请求的参数
|
* 获取获取当前请求的参数
|
||||||
* @access public
|
* @access public
|
||||||
* @param string|array $name 变量名
|
* @param string|array $name 变量名
|
||||||
* @param mixed $default 默认值
|
* @param mixed $default 默认值
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class File
|
|||||||
$current_uri = "cmd:" . implode(' ', $_SERVER['argv']);
|
$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) : '∞';
|
$reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞';
|
||||||
$time_str = ' [运行时间:' . number_format($runtime, 6) . 's][吞吐率:' . $reqs . 'req/s]';
|
$time_str = ' [运行时间:' . number_format($runtime, 6) . 's][吞吐率:' . $reqs . 'req/s]';
|
||||||
$memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
$memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class Socket
|
|||||||
}
|
}
|
||||||
$trace = [];
|
$trace = [];
|
||||||
if (App::$debug) {
|
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) : '∞';
|
$reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞';
|
||||||
$time_str = ' [运行时间:' . number_format($runtime, 6) . 's][吞吐率:' . $reqs . 'req/s]';
|
$time_str = ' [运行时间:' . number_format($runtime, 6) . 's][吞吐率:' . $reqs . 'req/s]';
|
||||||
$memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
$memory_use = number_format((memory_get_usage() - THINK_START_MEM) / 1024, 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user