<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 流式传输到客户端浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Is Joomla 2.5 much faster than Joomla 1.5 Querywise(Joomla 2.5 比 Joomla 1.5 Querywise 快得多吗)
                  How to share Joomla login session from one joomla website to one ASP.Net MVC website(如何将 Joomla 登录会话从一个 joomla 网站共享到一个 ASP.Net MVC 网站)
                  htaccess redirect root to subdirectory but allow index.php in root AND query strings to function(htaccess 将根重定向到子目录,但允许根和查询字符串中的 index.php 起作用)
                  Joomla include database functions(Joomla 包含数据库功能)
                  nl2br() not working when displaying SQL results(显示 SQL 结果时 nl2br() 不起作用)
                  Joomla 2.5 JFactory::getSession(); seems to be caching in firefox(Joomla 2.5 JFactory::getSession();似乎在 Firefox 中缓存)
                • <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>