Lines Matching refs:zip
4 zip
14 $file = $dirname . 'tmp.zip';
17 copy(__DIR__ . '/test.zip', $file);
19 $zip = new ZipArchive();
20 if (!$zip->open($file)) {
25 var_dump($zip->addFromString('bar', __FILE__));
26 var_dump($zip->status == ZipArchive::ER_OK);
28 var_dump($zip->addFromString('entry1.txt', __FILE__, 0));
29 var_dump($zip->status == ZipArchive::ER_EXISTS);
31 var_dump($zip->addFromString('entry1.txt', __FILE__, ZipArchive::FL_OVERWRITE));
32 var_dump($zip->status == ZipArchive::ER_OK);
34 if ($zip->status == ZipArchive::ER_OK) {
35 dump_entries_name($zip);
36 $zip->close();
45 unlink($dirname . 'tmp.zip');