From 532e2125c1befd7b895617befbfb138018e13a51 Mon Sep 17 00:00:00 2001 From: Comsenz <10433182@qq.com> Date: Mon, 13 Nov 2017 13:59:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20index.php=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=BB=98=E8=AE=A4=E9=A6=96=E9=A1=B5=E7=9A=84=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/index.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/upload/index.php b/upload/index.php index 3cb9f93..2e53a34 100644 --- a/upload/index.php +++ b/upload/index.php @@ -124,8 +124,16 @@ if(!empty($url)) { } elseif(isset($_GET['fromuser']) && $_GET['fromuser']) { $url .= sprintf('%sfromuser=%s', $delimiter, rawurlencode($_GET['fromuser'])); } - header("HTTP/1.1 301 Moved Permanently"); - header("location: $url"); + $parse = parse_url($url); + if(!isset($parse['host']) && file_exists($parse['path'])) { + if(!empty($parse['query'])) { + parse_str($parse['query'], $_GET); + } + require './'.$parse['path']; + } else { + header("HTTP/1.1 301 Moved Permanently"); + header("location: $url"); + } } else { require './'.$_ENV['curapp'].'.php'; }