簡體   English   中英

Internet Explorer 6 PHP服務文件問題

[英]internet explorer 6 php serve file problem

冰雹,我在使用PHP將文件提供到客戶端時遇到問題。 當我要下載它時,將顯示“保存並打開”對話框,但不會顯示下載進度。 我怎么了

我將其發送給客戶端的標頭:

header('Content-Type: ');
header('Content-Description: File Transfer');
header('Accept-Ranges: bytes');
header('Content-Transfer-Encoding: binary');

保存對話框

http://vzz.ir/files/kn5gsecfnoia1cqkfop6.jpg

進度未顯示在ip中。

http://vzz.ir/files/88ruak7ocjgn10ha9mda.jpg

您應該使用文件大小設置標題,以顯示進度欄。 還應指定內容類型,對未知的mime類型使用application / ocet-stream (或強制下載)。

header('Content-Type: application/ocet-stream');
header('Content-Disposition: attachment; filename=test.dat');
header('Content-Length: '.filesize('test.dat'));
header('Content-Description: File Transfer');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
readfile('test.dat');
exit; 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM