简体   繁体   English

无法在Windows8和ie10上的php中下载任何文件?

[英]Not able to download any file in php on windows8 and ie10?

i have some file which generated dynamically and downloaded, code is running with no problem with other browser even on window 7 ie 10 working fine but not able two download file in window 8 ie10. 我有一些可以动态生成并下载的文件,即使在第7窗口(即10)上,代码也可以正常运行,而在第8窗口(IE10)中却没有两个下载文件。 i have also try to download simple text file with header text/plain which is also not downloading. 我也尝试下载带有标题文本/纯文本的简单文本文件,但该文件也没有下载。 it shows downloading prompt with the file name in which downloading code is there not the name i specified and nothing happen on clicking save in ie 10.working in other. 它显示了带有文件名的下载提示,其中没有我指定的下载代码名称,并且单击“另存为”时也没有任何反应。

<?php 
echo "this is sample text";
header('Content-type: text/plain');

//open/save dialog box
header('Content-Disposition: attachment;filename="sample.txt"');

?>

这是IE 10的window 8 bug,仅在以后修复:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM