HTML和PHP怎么输出下载PDF
话不多说,直接上代码:
//php 强制下载PDF文件 header('Content-type: application/pdf'); header('Content-Disposition: attachment; filename='.$fname); //随便一个名字都可以 readfile($pfname);//file的相对地址