在FF和chrome下都正常显示中文文件名,只是在IE下会出现乱码,如何解决?
保存文件部分代码如下:
private function set_headers() {
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
//header("Content-Type: application/octet-stream");
header("Content-Type: application/vnd.ms-excel;charset=UTF-8");
header("Content-Type: application/download");;
header("Content-Disposition: attachment;filename='中文名.xls'");
header("Content-Transfer-Encoding: binary ");
}