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 $InnerEnv;
global $Base64Env; global $Base64Env;
//include 'config.php'; //include 'config.php';
if ($disktag=='') $disktag = $_SERVER['disktag'];
$s = file_get_contents('config.php'); $s = file_get_contents('config.php');
$configs = substr($s, 18, -2); $configs = substr($s, 18, -2);
if ($configs!='') { if ($configs!='') {
$envs = json_decode($configs, true); $envs = json_decode($configs, true);
if (in_array($str, $InnerEnv)) { if (in_array($str, $InnerEnv)) {
if (in_array($str, $Base64Env)) return equal_replace($envs[$disktag][$str],1); if ($disktag=='') $disktag = $_SERVER['disktag'];
else return $envs[$disktag][$str]; if (isset($envs[$disktag][$str])) {
if (in_array($str, $Base64Env)) return equal_replace($envs[$disktag][$str],1);
else return $envs[$disktag][$str];
}
} else { } else {
if (in_array($str, $Base64Env)) return equal_replace($envs[$str],1); if (isset($envs[$str])) {
else return $envs[$str]; if (in_array($str, $Base64Env)) return equal_replace($envs[$str],1);
else return $envs[$str];
}
} }
} }
return ''; return '';