Update functions.php

pull/13/head
qkqpttgf 2020-01-05 15:45:36 +08:00 committed by GitHub
parent 5263b52b2c
commit 0ca43b99f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -5,12 +5,13 @@ function getpath()
$p = strpos($_SERVER['REQUEST_URI'],'?'); $p = strpos($_SERVER['REQUEST_URI'],'?');
if ($p>0) $path = substr($_SERVER['REQUEST_URI'], 0, $p); if ($p>0) $path = substr($_SERVER['REQUEST_URI'], 0, $p);
else $path = $_SERVER['REQUEST_URI']; else $path = $_SERVER['REQUEST_URI'];
return spurlencode($path, '/'); return $path;
//return spurlencode($path, '/');
} }
function getGET() function getGET()
{ {
$getstr = substr(urldecode($_SERVER['REQUEST_URI']), strpos($_SERVER['REQUEST_URI'],'?')); $getstr = urldecode(substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'],'?')));
while (substr($getstr, 0, 1) == '/' || substr($getstr, 0, 1) == '?') $getstr = substr($getstr, 1); while (substr($getstr, 0, 1) == '/' || substr($getstr, 0, 1) == '?') $getstr = substr($getstr, 1);
$getstrarr = explode("&",$getstr); $getstrarr = explode("&",$getstr);
foreach ($getstrarr as $getvalues) { foreach ($getstrarr as $getvalues) {