PHP读取ZIP文件详细信息
<?php
02 $zip = zip_open("20101105.zip");
03 if ($zip) {
04 while ($zip_entry = zip_read($zip)) {
05 echo "Name: " . zip_entry_name($zip_entry) . "<br/>";
06 echo "Actual Filesize: " . zip_entry_filesize($zip_entry) . "<br/>";
07 echo "Compressed Size: " . zip_entry_compressedsize($zip_entry) . "<br/>";
08 echo "Compression Method: " . zip_entry_compressionmethod($zip_entry) . "<br/>";
09 if (zip_entry_open($zip, $zip_entry, "r")) {
10 echo "File Contents:" . "<br/>";
11 $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
12 echo "$buf";
13 zip_entry_close($zip_entry);
14 }
15 echo "<br/>";
16 }
17 zip_close($zip);
18 }
19 ?>
摘自:尐桀的博客
补充:Web开发 , php ,