IE (HTTPS): generating pdf from php file doesn't work

后端 未结 6 1535

Here is my issue. I am trying to call a page: foo.php?docID=bar and return a PDF to the screen which is stored as a BLOB in the DB.

Here is the portion of my code w

6条回答
  •  渐次进展
    2020-12-30 08:52

    Try this:

     header("Content-Type: application/pdf");
     header("Content-Disposition: inline; filename=foo.pdf");
     header("Accept-Ranges: bytes");
     header("Content-Length: $len");
     header("Expires: 0");
     header("Cache-Control: private");
    

    Also, if you are using sessions, you can try setting

    session_cache_limiter("none");
    

    or

    session_cache_limiter("private");
    

提交回复
热议问题