mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-05-20 13:59:16 +08:00
修改文件上传配置
This commit is contained in:
parent
84bd116e8c
commit
8757edc409
@ -94,7 +94,7 @@ class Config extends Controller
|
||||
if (!empty($post['storage']['allow_exts'])) {
|
||||
$deny = ['sh', 'asp', 'bat', 'cmd', 'exe', 'php'];
|
||||
$exts = array_unique(str2arr(strtolower($post['storage']['allow_exts'])));
|
||||
if (array_intersect($deny, $exts)) $this->error('禁止上传可执行的文件!');
|
||||
if (count(array_intersect($deny, $exts)) > 0) $this->error('禁止上传可执行的文件!');
|
||||
$post['storage']['allow_exts'] = join(',', $exts);
|
||||
}
|
||||
foreach ($post as $name => $value) sysconf($name, $value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user