早睡早起,方能养生!
Sleep early rise early, square can preserve one's health!

文件下载提示:致命错误: Call to undefined function think\response\finfo_open()

super
2021-09-14 11:52
views 30
$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 条讨论
top