HTML和PHP怎么输出下载PDF

科技智趣坊 1     2102      服务端   0     0
HTML和PHP怎么输出下载PDF

话不多说,直接上代码:

//php 强制下载PDF文件

header('Content-type: application/pdf');

header('Content-Disposition: attachment; filename='.$fname);                //随便一个名字都可以

readfile($pfname);//file的相对地址


科技智趣坊  
1楼
[good]
captcha
微信赞赏
支付宝赞赏