开发者

Google Chrome saving PDF files generated by PHP with a .php extension

开发者 https://www.devze.com 2023-04-03 16:27 出处:网络
When I generate a PDF using PHP in Google Chrome, it opens fine. As soon as I try to save the PDF file, it tries to save it as a .php file.

When I generate a PDF using PHP in Google Chrome, it opens fine. As soon as I try to save the PDF file, it tries to save it as a .php file.

It works fine in FireFox and Safari. Is it a Google Chrome issue or is there something I can do in PHP to make it work properly?

I'm usin开发者_如何学编程g TCPDF to generate the PDF files.


Don't think you can work arround it unless you can figure out how to rename the file with a PDF extension. Even then Chrome's PDF viewer's save as may redownload the file regardless, so that's something you may need to consider.

0

精彩评论

暂无评论...
验证码 换一张
取 消