代码如下:
//php 网页直接打开PDF
header('Content-type: application/pdf');
header('filename='.$fname); //随便一个名字都可以
readfile($pfname); //file的相对地址
//php 强制下载PDF文件
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename='.$fname); //随便一个名字都可以
readfile($pfname); //file的相对地址
如本文对您有用,您的捐赠和留言将是我最好的支持~
如您愿意,请向更多志同道合的朋友们推荐本站,谢谢。
请尊重他人劳动成果。
转载请务必附上原文链接,我将感激不尽。
有什么问题可以 留言或QQ联系我