【问题标题】:How to read a single file inside a remote zip archive (url with zip)如何读取远程 zip 存档中的单个文件(带 zip 的 URL)
【发布时间】:2020-10-09 19:45:30
【问题描述】:

我想读取带有 TXT 文件的 zip 文件,但我的 zip 文件存在于不同的 url,而不是本地机器上。 我尝试了两种方法都没有成功。

  1. $result = file_get_contents('zip://http://www.abcde.com/12345.zip#1234.txt'); 或
  2. $fp = fopen('zip://http://www.abcde.com/12345.zip#1234.txt', 'r'); 知道怎么做吗?

【问题讨论】:

    标签: php zip fopen file-get-contents


    【解决方案1】:

    最好的解决方案是将 zip 从远程复制到本地,然后它应该会更好地工作。

    【讨论】:

      猜你喜欢
      • 2012-05-12
      • 2011-05-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多