From 1d36bd3213fd11ba8336e48d592f4ad784c21db0 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 29 Jan 2020 20:51:00 +0800 Subject: [PATCH] if there is 'index.html', then do not show file but show the html --- function/common.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/function/common.php b/function/common.php index f723435..33fec70 100644 --- a/function/common.php +++ b/function/common.php @@ -857,11 +857,12 @@ function render_list($path, $files) $theme = getConfig('theme'); if ( $theme=='' || !file_exists('theme/'.$theme) ) $theme = 'classic.php'; - include 'theme/'.$theme; + $htmlpage = include 'theme/'.$theme; $html = '' . ob_get_clean(); + if (isset($htmlpage['statusCode'])) return $htmlpage; if ($_SERVER['Set-Cookie']!='') return output($html, $statusCode, [ 'Set-Cookie' => $_SERVER['Set-Cookie'], 'Content-Type' => 'text/html' ]); return output($html,$statusCode); }