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);