开发者

Extracting the content of a downloaded zipfile without storing it to the disc in PHP

开发者 https://www.devze.com 2023-03-21 18:10 出处:网络
I\'m retrieving a zip-Archive via a SOAP call in PHP. Is there a way to extract the content without writing it to a file first?

I'm retrieving a zip-Archive via a SOAP call in PHP. Is there a way to extract the content without writing it to a file first? So far all I found seemed to rely on storing the data in a local file, extract t开发者_StackOverflow中文版he content and delete the file again which seems superfluous to me.


There are PHP classes that use gzuncompress functions for zip decompression. I think they can take zip file inside a string and if not you can adapt the code to your purposes.

This is an example of one such class (code from here under LGPL, requires registration).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号