<legend id='dUZNr'><style id='dUZNr'><dir id='dUZNr'><q id='dUZNr'></q></dir></style></legend>
      <bdo id='dUZNr'></bdo><ul id='dUZNr'></ul>

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

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

      2. 来自远程服务器的 PHP 目录列表

        PHP directory list from remote server(来自远程服务器的 PHP 目录列表)
          • <bdo id='tP79x'></bdo><ul id='tP79x'></ul>
            <legend id='tP79x'><style id='tP79x'><dir id='tP79x'><q id='tP79x'></q></dir></style></legend>
          • <i id='tP79x'><tr id='tP79x'><dt id='tP79x'><q id='tP79x'><span id='tP79x'><b id='tP79x'><form id='tP79x'><ins id='tP79x'></ins><ul id='tP79x'></ul><sub id='tP79x'></sub></form><legend id='tP79x'></legend><bdo id='tP79x'><pre id='tP79x'><center id='tP79x'></center></pre></bdo></b><th id='tP79x'></th></span></q></dt></tr></i><div id='tP79x'><tfoot id='tP79x'></tfoot><dl id='tP79x'><fieldset id='tP79x'></fieldset></dl></div>
            <tfoot id='tP79x'></tfoot>

                  <tbody id='tP79x'></tbody>
              1. <small id='tP79x'></small><noframes id='tP79x'>

                1. 本文介绍了来自远程服务器的 PHP 目录列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何使用 opendir 函数读取知道 IP 地址的远程服务器的目录列表?

                  How can i use opendir function to read the directory list of a remote server knowing its IP address?

                  推荐答案

                  假设您尝试使用 HTTP 访问远程服务器,您将无法直接执行此操作.由于 HTTP 确实要访问远程服务器的 Web 服务,因此它控制文件的显示方式.对于许多 Web 服务器,您可以打开文件夹内容的索引".这会导致文件夹中的条目在浏览器中显示为 HTML.为了遍历目录结构,您需要解析此 HTML 以找到路径信息.

                  Assuming you are trying to access the remote server using HTTP, you won't be able to do this directly. Since HTTP is really going access the web service of your remote server, it controls how the files are presented to you. In the case of many web servers, you can turn on "indexes" for folder contents. This causes the entries in the folder to be displayed in your browser as HTML. In order to traverse the directory structure, you would need to parse this HTML to find the path information.

                  如果您使用 FTP,您可以将 ftp://... URL 传递给 opendir() 从 5.0 版本开始.请注意,您的服务器管理员可以关闭此功能.如果您不能直接使用此功能,请参阅 PHP 的 FTP 函数 手册(包括 ftp_nlist() 用于列出文件.

                  If you are using FTP, you can pass the ftp://... URL to opendir() as of version 5.0. Note that this capability can be turned off by your server admin. If you cannot use this feature directly, see the FTP functions manual for PHP (including ftp_nlist() for listing files).

                  以上参考文献中的一个例子:

                  An example from the above references:

                  <?php
                  
                  // set up basic connection
                  $conn_id = ftp_connect($ftp_server);
                  
                  // login with username and password
                  $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
                  
                  // get contents of the current directory
                  $contents = ftp_nlist($conn_id, ".");
                  
                  // output $contents
                  var_dump($contents);
                  
                  ?>
                  

                  这篇关于来自远程服务器的 PHP 目录列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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. <i id='qg94O'><tr id='qg94O'><dt id='qg94O'><q id='qg94O'><span id='qg94O'><b id='qg94O'><form id='qg94O'><ins id='qg94O'></ins><ul id='qg94O'></ul><sub id='qg94O'></sub></form><legend id='qg94O'></legend><bdo id='qg94O'><pre id='qg94O'><center id='qg94O'></center></pre></bdo></b><th id='qg94O'></th></span></q></dt></tr></i><div id='qg94O'><tfoot id='qg94O'></tfoot><dl id='qg94O'><fieldset id='qg94O'></fieldset></dl></div>
                3. <legend id='qg94O'><style id='qg94O'><dir id='qg94O'><q id='qg94O'></q></dir></style></legend>
                    <bdo id='qg94O'></bdo><ul id='qg94O'></ul>

                      <tfoot id='qg94O'></tfoot>

                          <tbody id='qg94O'></tbody>

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