Update scf.php

pull/31/head^2
qkqpttgf 2020-03-13 21:32:43 +08:00 committed by GitHub
parent c2572bfb19
commit cc01d20d05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 5 deletions

View File

@ -58,13 +58,18 @@ function getConfig($str, $disktag = '')
{
global $InnerEnv;
global $Base64Env;
if ($disktag=='') $disktag = $_SERVER['disktag'];
if (in_array($str, $InnerEnv)) {
if (in_array($str, $Base64Env)) return equal_replace(json_decode(getenv($disktag), true)[$str],1);
else return json_decode(getenv($disktag), true)[$str];
if ($disktag=='') $disktag = $_SERVER['disktag'];
$env = json_decode(getenv($disktag), true);
if (isset($env[$str])) {
if (in_array($str, $Base64Env)) return equal_replace($env[$str],1);
else return $env[$str];
}
} else {
if (in_array($str, $Base64Env)) return equal_replace(getenv($str),1);
else return getenv($str);
}
if (in_array($str, $Base64Env)) return equal_replace(getenv($str),1);
else return getenv($str);
return '';
}
function setConfig($arr, $disktag = '')