Parcourir la source

超管后台环境检测

萤火科技 il y a 3 ans
Parent
commit
513872d65b
1 fichiers modifiés avec 17 ajouts et 2 suppressions
  1. 17 2
      app/admin/controller/setting/Science.php

+ 17 - 2
app/admin/controller/setting/Science.php

@@ -96,8 +96,8 @@ class Science extends Controller
             ],
             [
                 'name' => '程序运行目录',
-                'key' => 'web_path',
-                'value' => str_replace('\\', '/', web_path()),
+                'key' => 'root_path',
+                'value' => str_replace('\\', '/', root_path()),
                 'status' => 'normal',
                 'remark' => ''
             ],
@@ -125,6 +125,13 @@ class Science extends Controller
                 'status' => extension_loaded('mysqlnd') ? 'normal' : 'danger',
                 'remark' => '您的PHP环境不支持mysqlnd, 系统无法正常运行'
             ],
+//            [
+//                'name' => 'Redis',
+//                'key' => 'redis',
+//                'value' => '支持',
+//                'status' => extension_loaded('redis') ? 'normal' : 'warning',
+//                'remark' => '您的PHP环境不支持redis, 系统无法使用队列服务'
+//            ],
             [
                 'name' => 'ZIP',
                 'key' => 'zip',
@@ -207,6 +214,7 @@ class Science extends Controller
         $paths = [
             'data' => realpath(data_path()) . '/',
             'uploads' => realpath(web_path()) . '/uploads/',
+            'downloads' => realpath(web_path()) . '/downloads/',
             'temp' => realpath(web_path()) . '/temp/',
         ];
         return [
@@ -224,6 +232,13 @@ class Science extends Controller
                 'status' => helper::checkWriteable($paths['uploads']) ? 'normal' : 'danger',
                 'remark' => '目录不可写,系统将无法正常上传文件'
             ],
+            [
+                'name' => '文件下载目录',
+                'key' => 'downloads',
+                'value' => str_replace('\\', '/', $paths['downloads']),
+                'status' => helper::checkWriteable($paths['downloads']) ? 'normal' : 'danger',
+                'remark' => '目录不可写,系统将无法正常上传文件'
+            ],
             [
                 'name' => '临时文件目录',
                 'key' => 'temp',