Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php随机访问压缩_Php_Zip_Random Access - Fatal编程技术网

Php随机访问压缩

Php随机访问压缩,php,zip,random-access,Php,Zip,Random Access,我有一个巨大的压缩包,包含不少于100000个文件。 如果我需要访问特定文件,我必须克服这个负担: $zip = zip_open("some.zip".$outFile); while ($zip_entry = zip_read($zip)) { //compare the entry against something until I find the one I am looking for // and then.. zip_entry_read($zip_entry, zip

我有一个巨大的压缩包,包含不少于100000个文件。 如果我需要访问特定文件,我必须克服这个负担:

$zip = zip_open("some.zip".$outFile);
while ($zip_entry = zip_read($zip)) 
{
 //compare the entry against something until I find the one I am looking for 
 // and then.. zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
}
有没有其他方法可以直接查找zip文件的第n个条目并获取解压缩的内容

感谢

PHP API(>=5.2)提供了两个函数来直接访问ZIP存档中的条目:

PHP API(>=5.2)提供了两个函数来直接访问ZIP存档中的条目: