
-----------------代码以下----------------
$file = request() -> file('file');
$info = $file -> validate(['size' => 512000,'ext' => 'jpg,png,jpeg','type' => 'image/jpeg,image/png']) -> move(ROOT_PATH.'public'.DS.'uploads');
上传报错
致命错误: Call to undefined function think\finfo_open()
$file -> validate() 难道不支持 'type' => 'image/jpeg,image/png' 校验吗?
我把 'type' 参数 删除 可以正常上传,加参数'type'文件MIME类型校验就报错了
看了thinkphp手册是有这 是有'type' 参数的哦。。 麻烦版主测试下 看看是不是BUG问题哦。。
最佳答案