PHP 8.5.0 Alpha 4 available for testing

Voting

: max(three, eight)?
(Example: nine)

The Note You're Voting On

Jerry dot Saravia at emc dot com
13 years ago
The following code can be used to get a list of all the file names in a zip file.

<?php
$za
= new ZipArchive();

$za->open('theZip.zip');

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

<< Back to user notes page

To Top