我正在尝试制作一个在线 kickstart 配置文件创建器.在服务器上创建文件后,如何弹出下载对话框以便用户下载?
I am trying to make an online kickstart config file creator. After the file is created on the server how do I get the download dialog to pop up so the user can download it?
Content-Disposition header..
Content-Disposition header..
// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');
// The PDF source is in original.pdf
readfile('original.pdf');
http://au2.php.net/manual/en/function.头文件
这篇关于使用 PHP 打开下载对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!