$excel_name = str_replace('+', '%20', urlencode($excel_name)); //使用urlencode对文件名进行重新编码
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header("Content-Disposition: attachment;filename= '{$excel_name}.xlsx'");
原文:https://blog.youkuaiyun.com/hwhsong/article/details/79449036