From 5263b52b2c3e4748de48b73995aa3e8aab2ecf57 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 5 Jan 2020 13:17:45 +0800 Subject: [PATCH] Update functions.php --- functions.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index dcddc1f..2016b12 100644 --- a/functions.php +++ b/functions.php @@ -1,8 +1,16 @@ 0) $path = substr($_SERVER['REQUEST_URI'], 0, $p); + else $path = $_SERVER['REQUEST_URI']; + return spurlencode($path, '/'); +} + function getGET() { - $getstr = substr(urldecode($_SERVER['REQUEST_URI']), strlen(urldecode($_SERVER['REDIRECT_URL']))); + $getstr = substr(urldecode($_SERVER['REQUEST_URI']), strpos($_SERVER['REQUEST_URI'],'?')); while (substr($getstr, 0, 1) == '/' || substr($getstr, 0, 1) == '?') $getstr = substr($getstr, 1); $getstrarr = explode("&",$getstr); foreach ($getstrarr as $getvalues) {