From cdd53ac377a3a6e4058b0f1f39f4eeec48d74353 Mon Sep 17 00:00:00 2001 From: Karson <karsonzhang@163.com> Date: Fri, 4 Sep 2020 14:22:13 +0800 Subject: [PATCH] 优化安装脚本检测 --- public/admin.php | 3 +-- public/index.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/public/admin.php b/public/admin.php index 8a28a77..cd8619d 100644 --- a/public/admin.php +++ b/public/admin.php @@ -17,8 +17,7 @@ define('APP_PATH', __DIR__ . '/../application/'); // 判断是否安装 if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) { - $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); - header("Location: {$_SERVER['REQUEST_SCHEME']}://{$_SERVER['HTTP_HOST']}{$uri}/install.php"); + header("location:./install.php"); exit; } diff --git a/public/index.php b/public/index.php index 8211765..a47e93d 100755 --- a/public/index.php +++ b/public/index.php @@ -15,8 +15,7 @@ define('APP_PATH', __DIR__ . '/../application/'); // 判断是否安装 if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) { - $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); - header("Location: {$_SERVER['REQUEST_SCHEME']}://{$_SERVER['HTTP_HOST']}{$uri}/install.php"); + header("location:./install.php"); exit; } -- libgit2 0.24.0