📜  php 读取 zip 文件而不解压 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:54.125000             🧑  作者: Mango

代码示例1
As found as a comment on http://www.php.net/ziparchive:

The following code can be used to get a list of all the file names in a zip file.

open('theZip.zip'); 

for( $i = 0; $i < $za->numFiles; $i++ ){ 
    $stat = $za->statIndex( $i ); 
    print_r( basename( $stat['name'] ) . PHP_EOL ); 
}
?>