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

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

    • <bdo id='ObC8e'></bdo><ul id='ObC8e'></ul>

      <legend id='ObC8e'><style id='ObC8e'><dir id='ObC8e'><q id='ObC8e'></q></dir></style></legend>

      FTP从服务器直接下载文件到客户端

      FTP download file from server directly into client(FTP从服务器直接下载文件到客户端)
      <tfoot id='0BcHY'></tfoot>

        <i id='0BcHY'><tr id='0BcHY'><dt id='0BcHY'><q id='0BcHY'><span id='0BcHY'><b id='0BcHY'><form id='0BcHY'><ins id='0BcHY'></ins><ul id='0BcHY'></ul><sub id='0BcHY'></sub></form><legend id='0BcHY'></legend><bdo id='0BcHY'><pre id='0BcHY'><center id='0BcHY'></center></pre></bdo></b><th id='0BcHY'></th></span></q></dt></tr></i><div id='0BcHY'><tfoot id='0BcHY'></tfoot><dl id='0BcHY'><fieldset id='0BcHY'></fieldset></dl></div>
      1. <small id='0BcHY'></small><noframes id='0BcHY'>

          <bdo id='0BcHY'></bdo><ul id='0BcHY'></ul>
            <tbody id='0BcHY'></tbody>

                <legend id='0BcHY'><style id='0BcHY'><dir id='0BcHY'><q id='0BcHY'></q></dir></style></legend>
              • 本文介绍了FTP从服务器直接下载文件到客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我尝试将文件从 FTP 服务器下载到客户端.如果我使用ftp_get,文件被下载到PHP服务器,它可以将输出写入浏览器.所以下载过程是

                I try to download a file from FTP server into client. If I use ftp_get, the file is downloaded into PHP server, which can write the output into browser. So the download process is

                FTP server -> PHP server -> client
                

                这会使流量翻倍 - 这对下载大文件很不利.有一种方法可以将文件直接写入此处描述的浏览器:流式 FTP 下载到输出 - 但无论如何数据都会流经 PHP 服务器,对吗?

                This doubles traffic - this is bad in downloading big files. There is a way how to write the file directly into the browser described here: Stream FTP download to output - but the data flows through PHP server anyway, am I right?

                有什么方法可以建立这个下载(如果是,怎么做?),还是根本不可能?

                Is there any way how to establish this download (if yes, how?), or is it principially impossible?

                FTP server -> client
                

                它还应该以安全的方式与非匿名 FTP 服务器一起使用.

                it should work also with non-anonymous FTP servers in secure way.

                推荐答案

                试试下面的代码.

                $curl = curl_init();
                $file = fopen("ls-lR.gz", 'w');
                curl_setopt($curl, CURLOPT_URL, "ftp://ftp.sunet.se/ls-lR.gz"); #input
                curl_setopt($curl, CURLOPT_FILE, $file); #output
                curl_setopt($curl, CURLOPT_USERPWD, "$_FTP[username]:$_FTP[password]");
                curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
                curl_exec($curl);
                

                谢谢.

                这篇关于FTP从服务器直接下载文件到客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                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 的问题)
                  <tbody id='cG78p'></tbody>

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

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

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