From 57e2c63c038d265dbd6c01eb240c111692aad966 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Fri, 3 Mar 2023 15:02:48 +0800 Subject: [PATCH] parse index.htm --- common.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common.php b/common.php index e2cc03e..33fe9c0 100644 --- a/common.php +++ b/common.php @@ -672,6 +672,7 @@ function isHideFile($name) 'foot.omf', 'favicon.ico', 'robots.txt', + 'index.htm', 'index.html', ]; @@ -2215,6 +2216,10 @@ function render_list($path = '', $files = []) $htmlcontent = get_content(path_format($path . '/index.html'))['content']; return output($htmlcontent['body'], $htmlcontent['stat']); } + if (isset($files['list']['index.htm']) && !$_SERVER['admin']) { + $htmlcontent = get_content(path_format($path . '/index.htm'))['content']; + return output($htmlcontent['body'], $htmlcontent['stat']); + } //$path = str_replace('%20','%2520',$path); //$path = str_replace('+','%2B',$path); $path1 = path_format(urldecode($path));