PHP 强制下载文件代码 2020-02-16 分类:PHP 标签Tags:php,强制,下载,文件,代码,实现,如下,filename,png,header,content,type,application,force,download,disposition,attachment,echo
实现代码如下: <?php $filename = '1.png'; header("Content-Type: application/force-download"); header('Content-Disposition: attachment; filename="'.$filename.'"'); echo $filename; ?> 以上就是【PHP 强制下载文件代码】的全部内容了,欢迎留言评论进行交流!