简体   繁体   中英

How to extract single file from remote zip archive on non-anonymous FTP using PHP?

I'm trying to find a solution implemented in PHP to extract a single file from a zip archive stored on a non-anonymous FTP.

The Problem is: I can't use a FTP URL like " ftp://user:pass@www.domain.com/archive.zip " to create a valid ZipArchive-object, which could handle the remaining tasks. (I tested this with a local archive.)

I also tried using the Phar extension and the File_Archive package - to no avail.

Java seems to offer a solution , but the server in question only runs PHP.

Does anyone of you have another approach in mind to solve the problem?

Thanks for your help in advance!

如果可以安装Pecl库zip,则应该可以使用zip_open()zip_entry_read函数来执行所需的操作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM