diff --git a/application/admin/controller/Config.php b/application/admin/controller/Config.php index d15f5e534..b18160879 100644 --- a/application/admin/controller/Config.php +++ b/application/admin/controller/Config.php @@ -71,10 +71,12 @@ class Config extends Controller if (Request::isGet()) { $this->title = '系统参数配置'; $this->fetch(); + } else { + foreach (Request::post() as $key => $value) { + sysconf($key, $value); + } + $this->success('系统参数配置成功!'); } - $post = $this->request->post(); - foreach ($post as $key => $value) sysconf($key, $value); - $this->success('系统参数配置成功!'); } /** diff --git a/application/admin/controller/api/Plugs.php b/application/admin/controller/api/Plugs.php index 99444c463..dc3fd76a4 100644 --- a/application/admin/controller/api/Plugs.php +++ b/application/admin/controller/api/Plugs.php @@ -44,7 +44,7 @@ class Plugs extends Controller */ public function check() { - $diff1 = explode(',', strtolower(input('exts'))); + $diff1 = explode(',', strtolower(input('exts', ''))); $diff2 = explode(',', strtolower(sysconf('storage_local_exts'))); $exts = array_intersect($diff1, $diff2); $this->success('获取文件上传参数', [ diff --git a/application/admin/view/config/storage-local.html b/application/admin/view/config/storage-local.html index 6c45e28de..12012103a 100644 --- a/application/admin/view/config/storage-local.html +++ b/application/admin/view/config/storage-local.html @@ -12,7 +12,7 @@
-