read file to get config not include

This commit is contained in:
qkqpttgf 2020-01-28 14:52:25 +08:00 committed by GitHub
parent 0e248978b1
commit ebaf8bd433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -259,7 +259,9 @@ function array_value_isnot_null($arr)
function setConfig($arr)
{
include 'config.php';
//include 'config.php';
$s = file_get_contents('config.php');
$configs = substr($s, 18, -2);
if ($configs!='') $envs = json_decode($configs, true);
foreach ($arr as $k1 => $v1) {
$envs[$k1] = $v1;