开发者

No progress bar in IE8 while executing the download using PHP

I am giving downloads to user using the PHP开发者_StackOverflow中文版 code below but when user downloading they are not able to see the progressbar in IE8 when clicked on save button. Please solve this. Thanks in advance.

header('Content-Description: Songsbin.com - Downlaod');
header('Content-type: audio/mpeg');
header('Content-Disposition: attachment; filename='.$filename1);
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: '.filesize($file));
ob_clean();
flush();
readfile($file);


Your code is correct, I also tried and both in Chrome and IE8 it works good...

if you succeed to download the file check that filesize($file) returns a correct output..


remove the 'Expires: 0' header directive

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜