Call to undefined function think\\finfo_open() 解决方案

三叔
三叔 http://www.sanshu.cn

0 People liked this article · 242 views

今天在做头像修改的时候报错的,提示错误:

Call to undefined function think \ finfo_open()} /**     * 获取文件类型信息     * @access public     * @return string     */ 
public function getMime(): string {
$finfo = finfo_open(FILEINFO_MIME_TYPE);
return finfo_file($finfo, $this->getPathname());
}

查了下资料,需要在php里安装这个插件


Published on 2024-03-11 10:41

Disclaimers:

This document is written by 三叔 Original published on WeCenter ,The copyright belongs to the author。

Log in,More exciting content waiting for you to find,Contribute wonderful answers,Participate in comment interaction

go Sign in! No accountgoregister