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

后端 未结 6 1524

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:55

    if ( USR_BROWSER_AGENT == 'IE' ) {
        header( 'Content-Disposition: inline; filename="' . $name . '"');
        header( 'Expires: 0' );
        header( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );
        header( 'Pragma: public' );
    } else {
        header( 'Content-Disposition: attachment; filename="' . $name . '"' );
        header( 'Expires: 0' );
        header( 'Pragma: no-cache' );
    }
    

提交回复
热议问题