From fcf38c0c93def155059b4d368e1eb6fe4ddc4492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E9=B9=84?= <1182383+zhc02@users.noreply.gitee.com> Date: Wed, 11 Mar 2020 23:55:41 +0800 Subject: [PATCH] 1 --- public/index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/index.php b/public/index.php index 22dc158..675f1fc 100644 --- a/public/index.php +++ b/public/index.php @@ -15,6 +15,12 @@ namespace think; // 加载基础文件 require __DIR__ . '/../thinkphp/base.php'; + +if(!file_exists("install/lock")){ + $url=$_SERVER['HTTP_HOST'].trim($_SERVER['SCRIPT_NAME'],'index.php').'install/index.php'; + header("Location:http://$url"); + exit(); +} // 支持事先使用静态方法设置Request对象和Config对象 // 执行应用并响应