我有一个脚本可以将 mysql 结果输出到 excel,它在所有浏览器中都可以正常工作。但是,我需要脚本也可以在 iPad 上工作,在 Safari 中打开 excel。此时,脚本只是“挂起”在 iPad 上,它一直在加载。这是标题问题吗?此时的代码头:
header( 'Content-Transfer-Encoding: binary' );
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header('Content-Type: application/vnd.ms-excel');
//header("Content-Type: application/octet-stream");
header('Content-Disposition: attachment;filename="' . $_POST['Client_FirstName'] . ' ' . $_POST['Client_LastName'] . ' ' . $_POST['month'] . '-' . $_POST['year'] . '.xlsx"');
header('Cache-Control: max-age=0');
header("Pragma: public");
header("Expires: 0");