gpt4 book ai didi

php - 具体 5.8.2 类 'finfo' 未找到

转载 作者:行者123 更新时间:2023-12-05 00:17:38 35 4
gpt4 key购买 nike

我已经搜索了网络和我的服务器,但我无法找到我网站的 php.ini。我的网站出现以下错误。

Class 'finfo' not found Details G:\inetpub\wwwroot\landoll.com\concrete\vendor\league\flysystem\src\Adapter\Local>.php(311): Whoops\Exception\ErrorException->null

   public function getMimetype($path)
{
$location = $this->applyPathPrefix($path);
$finfo = new Finfo(FILEINFO_MIME_TYPE); /*This is Line 311*/
$mimetype = $finfo->file($location);

if (in_array($mimetype, ['application/octet-stream', 'inode/x-empty'])) {
$mimetype = Util\MimeType::detectByFilename($location);
}

return ['path' => $path, 'type' => 'file', 'mimetype' => $mimetype];
}

最佳答案

finfo 是一个 PHP 扩展。
http://php.net/manual/en/class.finfo.php

根据您的虚拟主机,主机控制面板中可能有一个区域可以启用它。如果没有,您可能需要联系您的托管技术支持并要求他们为您启用它。

关于php - 具体 5.8.2 类 'finfo' 未找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46897699/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com