diff --git a/platform/Normal.php b/platform/Normal.php index 124bc3c..3b28d53 100644 --- a/platform/Normal.php +++ b/platform/Normal.php @@ -9,7 +9,8 @@ function getpath() if ($p>0) $path = substr($_SERVER['REQUEST_URI'], 0, $p); else $path = $_SERVER['REQUEST_URI']; $path = path_format( substr($path, strlen($_SERVER['base_path'])) ); - return substr($path, 1); + return $path; + //return substr($path, 1); //return spurlencode($path, '/'); } @@ -44,7 +45,8 @@ function getConfig($str, $disktag = '') global $Base64Env; //include 'config.php'; $s = file_get_contents('config.php'); - $configs = substr($s, 18, -2); + //$configs = substr($s, 18, -2); + $configs = '{' . splitlast(splitfirst($s, '{')[1], '}')[0] . '}'; if ($configs!='') { $envs = json_decode($configs, true); if (in_array($str, $InnerEnv)) { @@ -70,7 +72,8 @@ function setConfig($arr, $disktag = '') if ($disktag=='') $disktag = $_SERVER['disktag']; //include 'config.php'; $s = file_get_contents('config.php'); - $configs = substr($s, 18, -2); + //$configs = substr($s, 18, -2); + $configs = '{' . splitlast(splitfirst($s, '{')[1], '}')[0] . '}'; if ($configs!='') $envs = json_decode($configs, true); $disktags = explode("|",getConfig('disktag')); $indisk = 0; @@ -107,10 +110,8 @@ function setConfig($arr, $disktag = '') $envs = array_filter($envs, 'array_value_isnot_null'); ksort($envs); //echo '
'. json_encode($envs, JSON_PRETTY_PRINT).''; - $prestr = '