0

我想允许用户下载文件,所以所有工作都只是 FF 附加html,因为

Content-Type: text/html

我设置标题

header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Cache-Control: private',false);
header('Content-Encoding: UTF-8');
header('Content-Type: application/pdf');
header('Content-Disposition: attachment;filename=pdf_'.date("d_m_Y_G_i").'.pdf');
header('Content-Transfer-Encoding: binary');

但是当我总是检查标题时Content-Type: text/html。为什么?

4

0 回答 0