文件下载,程序是这样写的:
String fileType = "application/x-msdownload";
response.setContentType(fileType); //文件类型
String fileName = file.getFileName();
fileName=URLEncoder.encode(fileName, "UTF-8");
String dispositionHeader = "attachment;filename=" + fileName;
response.setHeader("Content-Disposition", dispositionHeader);在IE6中运行正确,弹出的文件保存框显示: 类型:Microsoft Excel 工作表
但在IE7中显示的为: 类型:未知文件类型找了半天也不知道这个问题怎么改.请教了~~要兼容IE6和IE7的
String fileType = "application/x-msdownload";
response.setContentType(fileType); //文件类型
String fileName = file.getFileName();
fileName=URLEncoder.encode(fileName, "UTF-8");
String dispositionHeader = "attachment;filename=" + fileName;
response.setHeader("Content-Disposition", dispositionHeader);在IE6中运行正确,弹出的文件保存框显示: 类型:Microsoft Excel 工作表
但在IE7中显示的为: 类型:未知文件类型找了半天也不知道这个问题怎么改.请教了~~要兼容IE6和IE7的
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货