summaryrefslogtreecommitdiff
path: root/ext/zip/examples/dir.php
blob: c362a72ba36f803654cf6b0ea5755887d1fc5271 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?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";