記憶體真的不足了
<?php $file="output".date("YmdHis").".xls"; header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=$file;"); //將PHP轉成下載的檔案指定名稱與副檔名.xls echo ''."\n"; echo ''."\n"; echo ''; echo ''; ?>