mirror of
https://github.com/php/php-src.git
synced 2024-12-11 19:04:38 +08:00
22 lines
486 B
PHP
22 lines
486 B
PHP
<?php
|
|
if (!extension_loaded('zip')) {
|
|
dl('zip.so');
|
|
}
|
|
|
|
$za = new ZipArchive();
|
|
|
|
$za->open('test_with_comment.zip');
|
|
print_r($za);
|
|
var_dump($za);
|
|
echo "numFiles: " . $za->numFiles . "\n";
|
|
echo "status: " . $za->status . "\n";
|
|
echo "statusSys: " . $za->statusSys . "\n";
|
|
echo "filename: " . $za->filename . "\n";
|
|
echo "comment: " . $za->comment . "\n";
|
|
|
|
for ($i=0; $i<$za->numFiles;$i++) {
|
|
echo "index: $i\n";
|
|
print_r($za->statIndex($i));
|
|
}
|
|
echo "numFile:" . $za->numFiles . "\n";
|