refactor: 修改文章导出

This commit is contained in:
2025-01-17 11:25:49 +08:00
parent 889add9c13
commit 780f7e0a0c

View File

@@ -228,7 +228,7 @@ class Article
$filename = date('YmdHms');
header('Access-Control-Expose-Headers: Content-Disposition');
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; Charset=UTF-8');
header('Content-Disposition: attachment;filename="' . $filename . '.xlsx"');
header('Content-Disposition: attachment;filename=' . $filename . '.xlsx');
header('Cache-Control: max-age=0');
$writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
$writer->save('php://output');