瀏覽代碼

Add content type header

Alan Lam 7 年之前
父節點
當前提交
aa6d7a0e5e
共有 1 個文件被更改,包括 1 次插入 和 0 次删除
  1. 1 0
      controllers/test_invoice.php

+ 1 - 0
controllers/test_invoice.php

@@ -42,6 +42,7 @@ $directory = $test->getDirectory();
 $pdf_filepath = $directory . "/tester_invoice.pdf";
 if($test->hasTesterInvoicePDF()) {
 	http::setDownloadHeaders($download_filename);
+	header("Content-Type: application/pdf");
 	readfile($pdf_filepath);
 	exit;
 }