From 2d18cc8167c08a59e109ba8a70e17ef5213c3188 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 30 Dec 2019 22:15:35 +0800 Subject: [PATCH] Create index.php --- index.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 index.php diff --git a/index.php b/index.php new file mode 100644 index 0000000..6d4f74d --- /dev/null +++ b/index.php @@ -0,0 +1,24 @@ +' . json_encode($_SERVER, JSON_PRETTY_PRINT) . ''; +if (!isset($_SERVER['REDIRECT_URL'])) $_SERVER['REDIRECT_URL'] = '/index.php'; +if ($_SERVER['REDIRECT_URL']=='') $_SERVER['REDIRECT_URL']='/'; +$path = $_SERVER['REDIRECT_URL']; + +$getstr = substr(urldecode($_SERVER['REQUEST_URI']), strlen(urldecode($_SERVER['REDIRECT_URL']))); + while (substr($getstr,0,1)=='/' || substr($getstr,0,1)=='?') $getstr = substr($getstr,1); + $getstrarr = explode("&",$getstr); + foreach ($getstrarr as $getvalues) if ($getvalues!='') { + $pos = strpos($getvalues,"="); + //echo $pos; + if ($pos>0) { + $getarry[urldecode(substr($getvalues,0,$pos))] = urldecode(substr($getvalues,$pos+1)); + } else $getarry[urldecode($getvalues)] = true; + } + if (isset($getarry)) { + $_GET = $getarry; + } else $_GET = ''; + + echo '
' . json_encode($_GET, JSON_PRETTY_PRINT) . '
'; +