xref: /PHP-5.3/ext/zip/examples/extractAll.php (revision 664d102a)
1<?php
2$zip = new ZipArchive();
3
4echo $zip->filename . "\n";
5$zip->open("test.zip");
6/*
7$zip->addFile("./modules/");
8$zip->addFile("./testempty");
9*/
10echo $zip->status . "\n";
11echo $zip->statusSys . "\n";
12
13echo $zip->numFiles . "\n";
14echo $zip->filename . "\n";
15var_dump($zip);
16$files = array('test', 'testdir/test2');
17if (!$zip->extractTo("./testext/path/to")) {
18	echo "error!\n";
19	echo $zip->status . "\n";
20	echo $zip->statusSys . "\n";
21
22}
23
24$zip->close();
25