<i id='eNjAf'><tr id='eNjAf'><dt id='eNjAf'><q id='eNjAf'><span id='eNjAf'><b id='eNjAf'><form id='eNjAf'><ins id='eNjAf'></ins><ul id='eNjAf'></ul><sub id='eNjAf'></sub></form><legend id='eNjAf'></legend><bdo id='eNjAf'><pre id='eNjAf'><center id='eNjAf'></center></pre></bdo></b><th id='eNjAf'></th></span></q></dt></tr></i><div id='eNjAf'><tfoot id='eNjAf'></tfoot><dl id='eNjAf'><fieldset id='eNjAf'></fieldset></dl></div>
<tfoot id='eNjAf'></tfoot>

    1. <legend id='eNjAf'><style id='eNjAf'><dir id='eNjAf'><q id='eNjAf'></q></dir></style></legend>

      1. <small id='eNjAf'></small><noframes id='eNjAf'>

          <bdo id='eNjAf'></bdo><ul id='eNjAf'></ul>

        PHP:将远程 pdf 流式传输到客户端浏览器

        PHP: stream remote pdf to client browser(PHP:将远程 pdf 流式传输到客户端浏览器)

          <tbody id='rdFZV'></tbody>
            <bdo id='rdFZV'></bdo><ul id='rdFZV'></ul>

                • <tfoot id='rdFZV'></tfoot>

                  <small id='rdFZV'></small><noframes id='rdFZV'>

                • <i id='rdFZV'><tr id='rdFZV'><dt id='rdFZV'><q id='rdFZV'><span id='rdFZV'><b id='rdFZV'><form id='rdFZV'><ins id='rdFZV'></ins><ul id='rdFZV'></ul><sub id='rdFZV'></sub></form><legend id='rdFZV'></legend><bdo id='rdFZV'><pre id='rdFZV'><center id='rdFZV'></center></pre></bdo></b><th id='rdFZV'></th></span></q></dt></tr></i><div id='rdFZV'><tfoot id='rdFZV'></tfoot><dl id='rdFZV'><fieldset id='rdFZV'></fieldset></dl></div>
                • <legend id='rdFZV'><style id='rdFZV'><dir id='rdFZV'><q id='rdFZV'></q></dir></style></legend>

                  本文介绍了PHP:将远程 pdf 流式传输到客户端浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在外部服务上生成了一个 pdf,我想将 pdf 流式传输到我的 php 服务器中的浏览器,同时流式传输到客户端,这样我就不需要从远程文件下载 pdf 然后开始初始化下载.我只会让文件立即下载或流式传输到请求它的客户端.

                  there's a pdf generated on an external service and I would like to stream the pdf to the browser in my php server while streaming to client so that I don't need to download the pdf from the remote file and then start initializing download. I would just have the file immediately download or stream to the client requesting it.

                  推荐答案

                  假设生成的 pdf 在 http://bar.com/foo.pdf,你可以这样做:

                  Assuming that the generated pdf is in http://bar.com/foo.pdf, you could do:

                    $data = file_get_contents("http://bar.com/foo.pdf");
                    header("Content-type: application/octet-stream");
                    header("Content-disposition: attachment;filename=YOURFILE.pdf");
                  
                    echo $data;
                  

                  这篇关于PHP:将远程 pdf 流式传输到客户端浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                • <legend id='sj4gh'><style id='sj4gh'><dir id='sj4gh'><q id='sj4gh'></q></dir></style></legend>

                • <small id='sj4gh'></small><noframes id='sj4gh'>

                    <bdo id='sj4gh'></bdo><ul id='sj4gh'></ul>
                    <i id='sj4gh'><tr id='sj4gh'><dt id='sj4gh'><q id='sj4gh'><span id='sj4gh'><b id='sj4gh'><form id='sj4gh'><ins id='sj4gh'></ins><ul id='sj4gh'></ul><sub id='sj4gh'></sub></form><legend id='sj4gh'></legend><bdo id='sj4gh'><pre id='sj4gh'><center id='sj4gh'></center></pre></bdo></b><th id='sj4gh'></th></span></q></dt></tr></i><div id='sj4gh'><tfoot id='sj4gh'></tfoot><dl id='sj4gh'><fieldset id='sj4gh'></fieldset></dl></div>
                  • <tfoot id='sj4gh'></tfoot>
                        <tbody id='sj4gh'></tbody>