Skip to content

Commit 16095b0

Browse files
committed
fix: switch page to internal output buffers
1 parent ea0d9b1 commit 16095b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Response.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ public function page(string $file, int $code = 200)
118118
{
119119
$this->status = $code;
120120
$this->headers['Content-Type'] = 'text/html';
121-
$this->content = require $file;
121+
122+
\ob_start();
123+
require $file;
124+
$this->content = ob_get_contents();
125+
ob_end_clean();
122126

123127
$this->send();
124128
}

0 commit comments

Comments
 (0)