From 700184c8eb14622e94cc13bfa9d3ad1f0b3d0ce1 Mon Sep 17 00:00:00 2001 From: Karson Date: Mon, 25 Jan 2021 21:04:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/command/Install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/admin/command/Install.php b/application/admin/command/Install.php index ae3da35a..f9da2cd7 100644 --- a/application/admin/command/Install.php +++ b/application/admin/command/Install.php @@ -210,7 +210,7 @@ class Install extends Command } return "'{$matches[1]}'{$matches[2]}=>{$matches[3]}Env::get('database.{$matches[1]}', '{$replace}'),"; }; - $dbConfigText = preg_replace_callback("/'(hostname|database|username|password|hostport|prefix)'(\s+)=>(\s+)Env::get\((.*)\)\,/", $callback, $config); + $dbConfigText = preg_replace_callback("/'(hostname|database|username|password|hostport|prefix)'(\s+)=>(\s+)Env::get\((.*)\)\,/", $callback, $dbConfigText); // 检测能否成功写入数据库配置 $result = @file_put_contents($dbConfigFile, $dbConfigText);