From 648023e43f5b805fb948f79d55a906c8e665156a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Thu, 24 Sep 2026 13:31:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=AE=89=E8=A3=85):=20=E7=A1=AE=E4=BF=9D?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E6=89=93=E5=BC=80=E5=AE=89=E8=A3=85=E5=85=A5?= =?UTF-8?q?=E5=8F=A3=E6=97=B6=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=AD=98?= =?UTF-8?q?=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/public/install/index.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/public/install/index.php b/backend/public/install/index.php index 27f2b1021..5a24e4ff6 100755 --- a/backend/public/install/index.php +++ b/backend/public/install/index.php @@ -15,6 +15,14 @@ if (function_exists('saeAutoLoader') || isset($_SERVER['HTTP_BAE_ENV_APPID'])) { define('APP_DIR', _dir_path(substr(dirname(__FILE__), 0, -15)));//项目目录 define('SITE_DIR', _dir_path(substr(dirname(__FILE__), 0, -8)));//入口文件目录 +// 首次打开安装入口时,确保配置文件存在,便于后续安装流程检测文件权限。 +foreach (['.env', '.constant'] as $filename) { + $configPath = APP_DIR . $filename; + if (!is_file($configPath)) { + @touch($configPath); + } +} + if (file_exists('../install.lock')) { showHtml('你已经安装过该系统,如果想重新安装,请先删除public目录下的 install.lock 文件,然后再安装。'); }