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

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

      <tfoot id='Ieq1f'></tfoot>
      1. <small id='Ieq1f'></small><noframes id='Ieq1f'>

        在 PHP 中的两个远程 FTP 服务器之间传输文件

        Transfer files between two remote FTP servers in PHP(在 PHP 中的两个远程 FTP 服务器之间传输文件)

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

              <tfoot id='zrljI'></tfoot>
              <i id='zrljI'><tr id='zrljI'><dt id='zrljI'><q id='zrljI'><span id='zrljI'><b id='zrljI'><form id='zrljI'><ins id='zrljI'></ins><ul id='zrljI'></ul><sub id='zrljI'></sub></form><legend id='zrljI'></legend><bdo id='zrljI'><pre id='zrljI'><center id='zrljI'></center></pre></bdo></b><th id='zrljI'></th></span></q></dt></tr></i><div id='zrljI'><tfoot id='zrljI'></tfoot><dl id='zrljI'><fieldset id='zrljI'></fieldset></dl></div>
                <bdo id='zrljI'></bdo><ul id='zrljI'></ul>
                    <tbody id='zrljI'></tbody>
                1. <legend id='zrljI'><style id='zrljI'><dir id='zrljI'><q id='zrljI'></q></dir></style></legend>
                  本文介绍了在 PHP 中的两个远程 FTP 服务器之间传输文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  首先,我知道这是一个重复的主题,但是我发现的另一个帖子对我的情况没有用,所以我决定创建一个新的.

                  First of all, I know that this a duplicate topic, but the other post that I found were not useful for my situation, so I decided to create a new one.

                  我想要完成的是从一台 FTP 服务器获取文件并将其上传到另一台 FTP 服务器.

                  What I'm trying to accomplish is to get a file from one FTP server and upload it to another FTP server.

                  我正在使用此代码:

                  $ftp_server = "ftp_server";
                  $ftp_user_name = 'ftp_username' ;
                  $ftp_user_pass = 'ftp_pass' ;
                  $localDir = "full/path/";
                  $serverDir = "full/path/";
                  
                  $conn_id = ftp_connect($ftp_server);
                  
                  $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
                  
                  if (ftp_get($conn_id, $localDir, $serverDir, FTP_BINARY)) {
                      // ftp_fput($conn_id, $file, $fp, FTP_ASCII))
                  }
                  

                  我遇到的问题是当你使用 ftp_put 命令时,它需要一个本地文件,但是这个文件不在我的电脑上,所以我无法将它上传到另一个 ftp.

                  The problem that I have is when you use ftp_put command, it requires a local file, but this file it's not on my computer, so I can't upload it to the other ftp.

                  有没有办法使用 ftp_put 将我刚刚通过 ftp_get 函数获得的文件上传到另一台服务器?无需先在 PC 上下载?

                  Is there a way to upload the file that I just got with ftp_get function into another server using ftp_put? Without the need to download it first on your PC?

                  谢谢!

                  推荐答案

                  ftp_getftp_put 都只能操作文件,不能操作文件夹.

                  Both ftp_get and ftp_put can operate with files only, not folders.

                  使用 ftp_get 将文件从第一台服务器下载到本地临时文件夹/文件.然后使用ftp_put将临时文件上传到第二台服务器.

                  Use ftp_get to download a file from the first server to a local temporary folder/file. And then use ftp_put to upload the temporary file to the second server.

                  如果您想避免使用临时文件,可以使用 ftp_fget 将文件下载到内存,然后使用 ftp_fput 重新上传到第二个服务器.

                  If you want to avoid using a temporary file, you can download the file to memory using ftp_fget and re-upload to the second server using ftp_fput.

                  • PHP:如何将 .txt 文件从 FTP 服务器读取到变量中?
                  • 在不使用中间文件的情况下将内存数据传输到 FTP 服务器

                  这篇关于在 PHP 中的两个远程 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 的问题)

                2. <legend id='TAVV0'><style id='TAVV0'><dir id='TAVV0'><q id='TAVV0'></q></dir></style></legend>
                    <bdo id='TAVV0'></bdo><ul id='TAVV0'></ul>

                        <tbody id='TAVV0'></tbody>

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

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