From abfc293f74f9ef5127b5c416310a01fe42e59368 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 10 Dec 2020 15:52:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Template.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Template.php b/src/Template.php index 00ca74d..0feca8e 100644 --- a/src/Template.php +++ b/src/Template.php @@ -245,7 +245,11 @@ public function fetch(string $template, array $vars = []): void // 页面缓存 ob_start(); - ob_implicit_flush(false); + if (PHP_VERSION > 8.0) { + ob_implicit_flush(false); + } else { + ob_implicit_flush(0); + } // 读取编译存储 $this->storage->read($cacheFile, $this->data);