Update heroku.php

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

View File

@ -41,13 +41,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);
}
return '';
}
function setConfig($arr, $disktag = '')