PHP:打开服务器上的文件下载? [英] PHP: Open a file on the server for download?
本文介绍了PHP:打开服务器上的文件下载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谢谢?
解决方案
请具体来说,您的服务器是否是Web服务器?如果是这样,您可以简单地将pdf添加到您的根目录中的某个位置,并直接在Web浏览器中导航,并自动下载。
ie http://whateveryoursiteis.com/testpdf.pdf
I have a PDF on my server. Now I want to open this file so the user can download it using the browser. How can I do that? I dont want to read the file or anything, its already on the server, just need to download it ...
Thanks?
解决方案
Please be more specific, is your server a web server? If so, you can simply add the pdf somewhere in your root directory and navigate to it directly in a web browser and it should automatically download.
ie http://whateveryoursiteis.com/testpdf.pdf
这篇关于PHP:打开服务器上的文件下载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文