From bb943b85510e6b8fbf7a2048778b317a67ef7715 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Fri, 10 Apr 2020 10:40:18 +0800 Subject: [PATCH] try fix file content --- common.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common.php b/common.php index c3db7f4..813485f 100644 --- a/common.php +++ b/common.php @@ -1112,6 +1112,15 @@ function fetch_files($path = '/') savecache('path_' . $path, $files); } } + if (isset($files['file'])) { + if (in_array(splitlast($files['name'],'.')[1], $exts['txt'])) { + if (!(isset($files['content'])&&$files['content']['stat']==200)) { + $content1 = curl_request($files[$_SERVER['DownurlStrName']]); + $files['content'] = $content1; + savecache('path_' . $path, $files); + } + } + } if (isset($files['error'])) { $files['error']['stat'] = $arr['stat']; }