文件下载提示:致命错误: Call to undefined function think\response\finfo_open()
super
2021-09-14 11:52

$document_root = $_SERVER['DOCUMENT_ROOT'];
$path = $document_root . '/upload/store/store.png';
$download = new \think\response\Download($path);
return $download->name('测试下载.png');

错误原因:未安装fileinfo扩展
安装完成后,重启nginx,重新测试

0 条讨论