I have this script to let the user download file:
header('Content-Encoding: UTF-8');
header("Content-Type: application/vnd.ms-excel; charset=UTF-8");
header("Content-Disposition: attachment; filename=qa_report.xlsx");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
// echo excel file ...
exit;
The file always have a BOM marker, how can't I remove the BOM marker?