2011-03-03 130 views

回答

1

只需設置正確的標題信息。 PHP文件應該看起來像這樣。

<? 
    header('Content-disposition: attachment; filename=huge_document.pdf'); 
    header('Content-type: application/pdf'); 
    readfile('huge_document.pdf'); 
?> 

這裏描繪

http://webdesign.about.com/od/php/ht/force_download.htm

問候

相關問題