From 2d68b3c81846f38a664482960344c59b64e08379 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Tue, 30 Jun 2020 10:18:48 +0800 Subject: [PATCH] update environment checker --- bootstrap/chkenv.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bootstrap/chkenv.php b/bootstrap/chkenv.php index 2017209a..44ee4358 100644 --- a/bootstrap/chkenv.php +++ b/bootstrap/chkenv.php @@ -40,11 +40,12 @@ 'bootstrap/cache', 'storage', 'plugins', + 'public', ], ]; foreach ($requirements['extensions'] as $extension) { - if (! extension_loaded($extension)) { + if (!extension_loaded($extension)) { die_with_utf8_encoding( "[Error] You have not installed the $extension extension
". "[错误] 你尚未安装 $extension 扩展!安装方法请自行搜索。" @@ -55,14 +56,14 @@ foreach ($requirements['write_permission'] as $dir) { $realPath = realpath(__DIR__."/../$dir"); - if (! is_writable($realPath)) { + if (!is_writable($realPath)) { die_with_utf8_encoding( "[Error] The directory '$dir' is not writable.
". "[错误] 目录 '$dir' 不可写,请检查该目录的权限。" ); } - if (! is_writable($realPath)) { + if (!is_writable($realPath)) { die_with_utf8_encoding( "[Error] The program lacks write permission to directory '$dir'
". "[错误] 程序缺少对 '$dir' 目录的写权限,请手动授权。"