From 20d44cb3334558ea80b1210dcbb20751a766dd4d Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 5 Jan 2020 16:53:40 +0800 Subject: [PATCH] Update functions.php --- functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions.php b/functions.php index 8282cd0..fee0970 100644 --- a/functions.php +++ b/functions.php @@ -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'];