Update normal.php

pull/31/head^2
qkqpttgf 2020-03-13 20:50:05 +08:00 committed by GitHub
parent 5d0fe1e551
commit f7188ff82a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 5 deletions

View File

@ -41,17 +41,21 @@ function getConfig($str, $disktag = '')
global $InnerEnv;
global $Base64Env;
//include 'config.php';
if ($disktag=='') $disktag = $_SERVER['disktag'];
$s = file_get_contents('config.php');
$configs = substr($s, 18, -2);
if ($configs!='') {
$envs = json_decode($configs, true);
if (in_array($str, $InnerEnv)) {
if (in_array($str, $Base64Env)) return equal_replace($envs[$disktag][$str],1);
else return $envs[$disktag][$str];
if ($disktag=='') $disktag = $_SERVER['disktag'];
if (isset($envs[$disktag][$str])) {
if (in_array($str, $Base64Env)) return equal_replace($envs[$disktag][$str],1);
else return $envs[$disktag][$str];
}
} else {
if (in_array($str, $Base64Env)) return equal_replace($envs[$str],1);
else return $envs[$str];
if (isset($envs[$str])) {
if (in_array($str, $Base64Env)) return equal_replace($envs[$str],1);
else return $envs[$str];
}
}
}
return '';