代码码完之后,在chrome浏览器下载没有问题,但是在safari浏览器下载总是带有.html
在http协议这块 改成下面就可以解决
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/vnd.ms-excel");
header("Content-Type:application/octet-stream");
header("Content-Type:application/download");;
header("Content-Disposition:attachment;filename=$fileName.xlsx");
header("Content-Transfer-Encoding:binary");
$objWrite->save('php://output');exit;