Wed, April 14, 2021
 
https://devcodepro.comdevcodepro
Home · Latest · Trends  /  PHP
7

List all files in Zip archive

List all files in Zip archive with PHP
<?php
$info = new ZipArchive(); 
$info->open('file.zip'); 
for($i = 0; $i < $info->numFiles; $i++ ){ 
$files = $info->statIndex($i); 
echo '<pre>';
print_r(basename($files['name']));
echo '</pre>';
}
?>
rated 7 times (7) (0)
comments: 0 / hits: 2700  / 5 years ago, sat, sep 10, 16, 03:16:20
More From » PHP
 

Comments

There are no comments for this Snippet yet
Only authorized users can post. Please sign in first, or register a free account
 
Share
Posted
Michael
Member since Sep 10, 2016
Total Code Snippets: 5
Total Comments: 0
Location: n/a
Michael snippets
5 years ago, sat, sep 10, 16, 3:07:57
comments: 1 / hits: 5091
PHP
5 years ago, sat, sep 10, 16, 3:13:33
comments: 0 / hits: 2595
PHP
5 years ago, sat, sep 10, 16, 3:19:13
comments: 1 / hits: 6173
PHP
4 years ago, tue, feb 21, 17, 2:06:26
comments: 0 / hits: 2150
PHP