Php随机访问压缩
我有一个巨大的压缩包,包含不少于100000个文件。 如果我需要访问特定文件,我必须克服这个负担: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
$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存档中的条目: