mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
改进Response类的send方法 去除 REQUEST_METHOD IS_GET IS_POST IS_PUT IS_DELETE IS_AJAX __EXT__ 常量 由应用自己定义
This commit is contained in:
@@ -15,6 +15,7 @@ use think\Cache;
|
||||
use think\Config;
|
||||
use think\Db;
|
||||
use think\Debug;
|
||||
use think\Request;
|
||||
|
||||
/**
|
||||
* 页面Trace调试
|
||||
@@ -41,10 +42,11 @@ class Trace
|
||||
*/
|
||||
public function save(array $log = [])
|
||||
{
|
||||
if (IS_CLI || IS_AJAX || IS_API || (defined('RESPONSE_TYPE') && !in_array(RESPONSE_TYPE, ['html', 'view']))) {
|
||||
if (IS_CLI || IS_API || Request::instance()->isAjax() || (defined('RESPONSE_TYPE') && !in_array(RESPONSE_TYPE, ['html', 'view']))) {
|
||||
// ajax cli api方式下不输出
|
||||
return false;
|
||||
}
|
||||
|
||||
// 获取基本信息
|
||||
$runtime = microtime(true) - START_TIME;
|
||||
$reqs = number_format(1 / number_format($runtime, 8), 2);
|
||||
|
||||
Reference in New Issue
Block a user