소스 검색

优化安装脚本检测

Karson 4 년 전
부모
커밋
cdd53ac377
2개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 2
      public/admin.php
  2. 1 2
      public/index.php

+ 1 - 2
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;
 }
 

+ 1 - 2
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;
 }