Update functions.php

This commit is contained in:
qkqpttgf
2020-01-05 16:53:40 +08:00
committed by GitHub
parent 84c270490b
commit 20d44cb333
+2
View File
@@ -2,6 +2,8 @@
function getpath()
{
$_SERVER['base_path'] = substr($_SERVER['SCRIPT_NAME'], 0, -10);
if ($_SERVER['base_path']=='') $_SERVER['base_path'] = '/';
$p = strpos($_SERVER['REQUEST_URI'],'?');
if ($p>0) $path = substr($_SERVER['REQUEST_URI'], 0, $p);
else $path = $_SERVER['REQUEST_URI'];