简体   繁体   中英

PHP Read from Zip Archive

I have some serialized data in a .gz ( tar then gz ) archive (~ 700MB), which I want to read in PHP without unzipping the same and extract some field out of it.

Have tried PHP : Zip class, however it keeps on giving this error "Can't find EOCD Signature". I have zip extension enabled.

Zip => enabled Extension Version => $Id: php_zip.c,v 1.95.2.6 2007/05/19 22:35:49 pajoye Exp $ Zip version => 1.8.10 Libzip version => 0.7.1

EDIT : Archive is not corrupted. It works well after unzipping and

Did you try gzopen ?

http://www.php.net/manual/en/function.gzopen.php

Ignore this line, I am putting it because of the 30 char limit.

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