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