Browse Source

将文件检查函数改为 is_file,为了提高效率,来自群友 Jesns 建议。

F4NNIU 7 years ago
parent
commit
f8412b828f
2 changed files with 3 additions and 3 deletions
  1. 2 2
      public/admin.php
  2. 1 1
      public/index.php

+ 2 - 2
public/admin.php

@@ -16,7 +16,7 @@
 define('APP_PATH', __DIR__ . '/../application/');
 
 // 判断是否安装FastAdmin
-if (!file_exists(APP_PATH . 'admin/command/Install/install.lock'))
+if (!is_file(APP_PATH . 'admin/command/Install/install.lock'))
 {
     header("location:./install.php");
     exit;
@@ -32,4 +32,4 @@ require __DIR__ . '/../thinkphp/base.php';
 \think\Url::root('');
 
 // 执行应用
-\think\App::run()->send();
+\think\App::run()->send();

+ 1 - 1
public/index.php

@@ -14,7 +14,7 @@
 define('APP_PATH', __DIR__ . '/../application/');
 
 // 判断是否安装FastAdmin
-if (!file_exists(APP_PATH . 'admin/command/Install/install.lock'))
+if (!is_file(APP_PATH . 'admin/command/Install/install.lock'))
 {
     header("location:./install.php");
     exit;