我正在使用PHP从数据库查询创建CSV文件.我运行查询,设置标题,并在Firefox中加载页面,文件提示下载并在excel中打开,就像它应该的那样.当我在IE中尝试它时,我收到一个错误说不
知道可以做些什么来解决这个问题.Internet Explorer cannot download ReportPrint.php from www.website.com.
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
header('Content-Description: File Transfer');
header("Content-Type: application/csv") ;
header("Content-Disposition: attachment; filename=Report.csv");
header("Pragma: no-cache");
header("Expires: 0");
echo "record1,record2,record3\n";
Run Code Online (Sandbox Code Playgroud)