note 105312 added to class.ziparchive
| From: | Jerry dot Saravia at emc dot com | Date: | Mon, 08 Aug 2011 20:57:06 +0000 |
| Subject: | note 105312 added to class.ziparchive | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-182349@lists.php.net to get a copy of this message | ||
The following code can be used to get a list of all the file names in a zip file.
$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 );
}
----
Server IP: 69.147.83.197
Probable Submitter: 128.221.197.57
----
Manual Page -- http://www.php.net/manual/en/class.ziparchive.php
Edit -- https://master.php.net/note/edit/105312
Del: integrated -- https://master.php.net/note/delete/105312/integrated
Del: useless -- https://master.php.net/note/delete/105312/useless
Del: bad code -- https://master.php.net/note/delete/105312/bad+code
Del: spam -- https://master.php.net/note/delete/105312/spam
Del: non-english -- https://master.php.net/note/delete/105312/non-english
Del: in docs -- https://master.php.net/note/delete/105312/in+docs
Del: other reasons-- https://master.php.net/note/delete/105312
Reject -- https://master.php.net/note/reject/105312
Search -- https://master.php.net/manage/user-notes.php