1
正如標題所指定的,當下載文件時,我得到一個文件沒有以指定格式錯誤。以下是我的代碼。另外,下載的文件沒有任何單元格。正在下載.xls拋出錯誤 - 文件不是指定格式
$content = ob_end_flush();
$filename = trim($filename);
$filename = str_replace(array(' ', '/', '\\'), '', $title);
$filename .= "_Export.xls";
header('Content-type: application/vnd.ms-excel; charset=utf-8');
//header('Content-type: application/ms-excel');
header('Content-Disposition: attachment; filename='.$filename);
echo $content;
仍然沒有工作... – user3214555
先生,請再給我一個解決方案.... – user3214555
只看到編輯答案... –