Lines Matching refs:zip
4 zip
9 $file = $dirname . 'oo_getnameindex.zip';
13 $zip = new ZipArchive;
14 if (!$zip->open($file, ZIPARCHIVE::CREATE)) {
18 $zip->addFromString('entry1.txt', 'entry #1');
19 $zip->addFromString('entry2.txt', 'entry #2');
20 $zip->addFromString('dir/entry2d.txt', 'entry #2');
22 if (!$zip->status == ZIPARCHIVE::ER_OK) {
23 echo "failed to write zip\n";
25 $zip->close();
27 if (!$zip->open($file)) {
32 var_dump($zip->getNameIndex(0));
33 var_dump($zip->getNameIndex(1));
34 var_dump($zip->getNameIndex(2));
35 var_dump($zip->getNameIndex(3));
37 $zip->close();
47 unlink(__DIR__ . '/oo_getnameindex.zip');