/PHP-7.1/ext/zip/tests/ |
H A D | oo_properties.phpt | 16 $zip = new ZipArchive; 21 printf("zip->status (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->status, empty($zip->status), isse… 22 printf("zip->numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->numFiles, empty($zip->numFiles)… 23 printf("zip->bogus (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->bogus, empty($zip->bogus), isset($… 28 printf("zip->status (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->status, empty($zip->status), isse… 29 printf("zip->numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->numFiles, empty($zip->numFiles)… 30 printf("zip->filename (%d):\n\tempty(): %d\n\tisset(): %d\n", strlen($zip->filename), empty($zip->f… 31 printf("zip->comment (%d):\n\tempty(): %d\n\tisset(): %d\n", strlen($zip->comment), empty($zip->com… 37 zip->status (0): 45 zip->bogus (0): [all …]
|
H A D | oo_setcomment.phpt | 6 if(!extension_loaded('zip')) die('skip'); 16 $zip = new ZipArchive; 38 echo "failed to write zip\n"; 40 $zip->close(); 42 if (!$zip->open($file)) { 47 var_dump($zip->getCommentIndex(0)); 48 var_dump($zip->getCommentIndex(1)); 49 var_dump($zip->getCommentIndex(2)); 50 var_dump($zip->getCommentIndex(3)); 51 var_dump($zip->getCommentIndex(4)); [all …]
|
H A D | bug47667.phpt | 6 if(!extension_loaded('zip')) die('skip'); 11 $filename = $thisdir . "/bug47667.zip"; 13 $zip = new ZipArchive(); 15 exit("Unable to open the zip file"); 18 $zip->close(); 22 $zip = new ZipArchive(); 27 $zip->close(); 30 $zip = new ZipArchive(); 32 exit("Unable to open the zip file"); 35 echo "files: " , $zip->numFiles; [all …]
|
H A D | oo_delete.phpt | 16 $zip = new ZipArchive; 25 $zip->close(); 28 var_dump($zip); 36 if ($zip->deleteIndex(0)) { 52 if (!$zip->deleteIndex(123)) { 55 print_r($zip); 60 $sb = $zip->statIndex(0); 62 $sb = $zip->statIndex(1); 64 $sb = $zip->statIndex(2); 67 @$zip->close(); [all …]
|
H A D | oo_getnameindex.phpt | 6 if(!extension_loaded('zip')) die('skip'); 12 $file = $dirname . '__tmp_oo_rename.zip'; 16 $zip = new ZipArchive; 26 echo "failed to write zip\n"; 28 $zip->close(); 30 if (!$zip->open($file)) { 35 var_dump($zip->getNameIndex(0)); 36 var_dump($zip->getNameIndex(1)); 37 var_dump($zip->getNameIndex(2)); 38 var_dump($zip->getNameIndex(3)); [all …]
|
H A D | oo_setcompression.phpt | 6 if (!extension_loaded('zip')) die('skip'); 17 $zip = new ZipArchive; 22 $zip->addFromString('entry1.txt', $txt); 23 $zip->addFromString('entry2.txt', $txt); 25 $zip->addFromString('entry4.txt', $txt); 26 $zip->addFromString('entry5.txt', $txt); 38 if (!$zip->close()) { 44 $zip = zip_open($tmpfile); 45 if (!is_resource($zip)) { 49 while ($e = zip_read($zip)) { [all …]
|
H A D | oo_namelocate.phpt | 6 if(!extension_loaded('zip')) die('skip'); 12 $file = $dirname . '__tmp_oo_rename.zip'; 16 $zip = new ZipArchive; 17 if (!$zip->open($file, ZIPARCHIVE::CREATE)) { 25 if (!$zip->status == ZIPARCHIVE::ER_OK) { 26 echo "failed to write zip\n"; 28 $zip->close(); 30 if (!$zip->open($file)) { 35 var_dump($zip->locateName('entry1.txt')); 36 var_dump($zip->locateName('eNtry2.txt')); [all …]
|
H A D | bug70103.phpt | 5 if (!extension_loaded('zip')) die('skip zip support not available'); 14 $zip = new ZipArchive(); 15 $zip->open($dir . '/test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE); 16 $zip->addGlob($dir . '/*.txt', GLOB_NOSORT, array('remove_all_path' => true)); 17 $zip->close(); 19 $zip = new ZipArchive(); 20 $zip->open($dir . '/test.zip'); 21 var_dump($zip->numFiles); 22 var_dump($zip->getNameIndex(0)); 23 $zip->close(); [all …]
|
H A D | oo_externalattributes.phpt | 6 if (!extension_loaded('zip')) die('skip'); 11 $name = __DIR__ . '/withattr.zip'; 14 $zip = new ZipArchive; 16 $zip->addFromString('foo.txt', 'foo'); 17 $zip->addFromString('bar.txt', 'bar'); 19 $id = $zip->locateName('bar.txt'); 21 $zip->close(); 24 $r = $zip->open($name); 26 $id = $zip->locateName('bar.txt'); 39 $zip->close(); [all …]
|
H A D | oo_rename.phpt | 6 if(!extension_loaded('zip')) die('skip'); 12 $file = $dirname . '__tmp_oo_rename.zip'; 16 $zip = new ZipArchive; 17 if (!$zip->open($file, ZIPARCHIVE::CREATE)) { 25 if (!$zip->status == ZIPARCHIVE::ER_OK) { 26 var_dump($zip); 30 $zip->close(); 32 if (!$zip->open($file)) { 36 dump_entries_name($zip); 46 dump_entries_name($zip); [all …]
|
H A D | stream_meta_data.phpt | 2 stream_get_meta_data() on zip stream 6 if(!extension_loaded('zip')) die('skip'); 13 $zip = new ZipArchive; 14 if (!$zip->open($file)) { 17 $fp = $zip->getStream('foo'); 24 $zip->close(); 27 $fp = fopen('zip://' . dirname(__FILE__) . '/test_with_comment.zip#foo', 'rb'); 45 string(3) "zip" 63 string(11) "zip wrapper" 65 string(3) "zip" [all …]
|
H A D | doubleclose.phpt | 5 if(!extension_loaded('zip')) die('skip'); 11 $zip = zip_open(dirname(__FILE__) . '/test.zip'); 12 if (!is_resource($zip)) { 15 var_dump(zip_close($zip)); 16 var_dump(zip_close($zip)); 19 $zip = new ZipArchive(); 20 if (!$zip->open(dirname(__FILE__) . '/test.zip')) { 23 if ($zip->status == ZIPARCHIVE::ER_OK) { 24 var_dump($zip->close()); 25 var_dump($zip->close());
|
H A D | oo_getcomment.phpt | 6 if(!extension_loaded('zip')) die('skip'); 11 $file = $dirname . 'test_with_comment.zip'; 13 $zip = new ZipArchive; 14 if (!$zip->open($file)) { 17 echo $zip->getArchiveComment() . "\n"; 19 $idx = $zip->locateName('foo'); 20 echo $zip->getCommentName('foo') . "\n"; 21 echo $zip->getCommentIndex($idx); 23 echo $zip->getCommentName('') . "\n"; 24 echo $zip->getCommentName() . "\n"; [all …]
|
H A D | oo_addemptydir.phpt | 6 if(!extension_loaded('zip')) die('skip'); 13 $file = $dirname . '__tmp_oo_addfile.zip'; 15 copy($dirname . 'test.zip', $file); 17 $zip = new ZipArchive; 18 if (!$zip->open($file)) { 22 $zip->addEmptyDir('emptydir'); 23 if ($zip->status == ZIPARCHIVE::ER_OK) { 24 dump_entries_name($zip); 25 $zip->close();
|
H A D | oo_addfile.phpt | 6 if(!extension_loaded('zip')) die('skip'); 13 $file = $dirname . '__tmp_oo_addfile.zip'; 15 copy($dirname . 'test.zip', $file); 17 $zip = new ZipArchive; 18 if (!$zip->open($file)) { 21 if (!$zip->addFile($dirname . 'utils.inc', 'test.php')) { 24 if ($zip->status == ZIPARCHIVE::ER_OK) { 25 dump_entries_name($zip); 26 $zip->close();
|
H A D | bug64342_1.phpt | 6 if(!extension_loaded('zip')) die('skip'); 13 $file = $dirname . '__tmp_oo_addfile.zip'; 15 copy($dirname . 'test.zip', $file); 17 $zip = new ZipArchive; 18 if (!$zip->open($file)) { 21 if (!$zip->addFile($dirname . 'cant_find_me.txt', 'test.php')) { 24 if ($zip->status == ZIPARCHIVE::ER_OK) { 25 dump_entries_name($zip); 26 $zip->close();
|
H A D | oo_open.phpt | 2 zip::open() function 6 if(!extension_loaded('zip')) die('skip'); 12 $zip = new ZipArchive; 13 $r = $zip->open($dirname . 'nofile'); 20 $r = $zip->open($dirname . 'nofile', ZIPARCHIVE::CREATE); 28 $zip = new ZipArchive; 29 $zip->open(''); 31 if (!$zip->open($dirname . 'test.zip')) { 35 if ($zip->status == ZIPARCHIVE::ER_OK) {
|
H A D | bug8009.phpt | 6 if(!extension_loaded('zip')) die('skip'); 11 $src = $thisdir . "/bug8009.zip"; 12 $filename = $thisdir . "/tmp8009.zip"; 15 $zip = new ZipArchive(); 17 if (!$zip->open($filename)) { 20 $zip->addFromString("2.txt", "=)"); 21 $zip->close(); 23 echo "status: " . $zip->status . "\n";
|
/PHP-7.1/ext/phar/tests/zip/ |
H A D | corrupt_008.phpt | 86 … unsupported compression method (Shrunk) used in this zip in zip-based phar "%scompress_unsup1.zip" 87 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup2.zip" 88 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup3.zip" 89 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup4.zip" 90 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup5.zip" 91 …unsupported compression method (Implode) used in this zip in zip-based phar "%scompress_unsup6.zip" 92 …nsupported compression method (Tokenize) used in this zip in zip-based phar "%scompress_unsup7.zip" 93 …supported compression method (Deflate64) used in this zip in zip-based phar "%scompress_unsup9.zip" 95 …r: unsupported compression method (LZMA) used in this zip in zip-based phar "%scompress_unsup14.zi… 98 …unsupported compression method (WavPack) used in this zip in zip-based phar "%scompress_unsup97.zi… [all …]
|
H A D | unixzip.phpt | 2 Phar: test a zip archive created by unix "zip" command 8 $a = new PharData(dirname(__FILE__) . '/files/zip.zip'); 23 dir phar://%s/zip.zip%cempty 24 phar://%s/zip.zip%chi.txt 27 dir phar://%s/zip.zip%cnotempty 28 phar://%s/zip.zip/notempty%chi.txt
|
/PHP-7.1/ext/zip/examples/ |
H A D | extractAll.php | 2 $zip = new ZipArchive(); variable 4 echo $zip->filename . "\n"; 5 $zip->open("test.zip"); 10 echo $zip->status . "\n"; 11 echo $zip->statusSys . "\n"; 13 echo $zip->numFiles . "\n"; 14 echo $zip->filename . "\n"; 15 var_dump($zip); 19 echo $zip->status . "\n"; 20 echo $zip->statusSys . "\n"; [all …]
|
H A D | extract.php | 6 $zip = new ZipArchive(); variable 8 echo $zip->filename . "\n"; 9 $zip->open("test.zip"); 14 echo $zip->status . "\n"; 15 echo $zip->statusSys . "\n"; 17 echo $zip->numFiles . "\n"; 18 echo $zip->filename . "\n"; 19 var_dump($zip); 23 echo $zip->status . "\n"; 24 echo $zip->statusSys . "\n"; [all …]
|
H A D | create.php | 8 $zip = new ZipArchive(); variable 11 if (!$zip->open($filename, ZIPARCHIVE::CREATE)) { 17 $zip->addFromString("testfilephp.txt" . time(), "#1 This is a test string added as testfilephp.txt.… 18 $zip->addFromString("testfilephp2.txt" . time(), "#2 This is a test string added as testfilephp2.tx… 19 $zip->addFile($thisdir . "/too.php","/testfromfile.php"); 20 echo "numfiles: " . $zip->numFiles . "\n"; 21 echo "status:" . $zip->status . "\n"; 22 $zip->close(); 23 unset($zip);
|
H A D | set_compression.php | 7 $zip = new ZipArchive(); variable 10 if (!$zip->open($filename, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE)) { 14 $zip->addFromString("testfilephp.txt", "#1 This is a test string added as testfilephp.txt.\n"); 15 $zip->addFromString("testfilephp2.txt", "#2 This is a test string added as testfilephp2.txt.\n"); 16 $zip->addFile("too.php", "testfromfile.php"); 18 $zip->setCompressionName("testfilephp2.txt", ZipArchive::CM_STORE); 19 $zip->setCompressionIndex(2, ZipArchive::CM_STORE); 21 $zip->close();
|
/PHP-7.1/ext/standard/tests/file/ |
H A D | basename-win32.phpt | 32 array("bar.zip", ".zip"), 33 array("bar.zip", "bar.zip"), 35 array("foo\\bar.zip", ".zip"), 36 array("\\bar.zip", ".zip"), 39 array("bar.zip\\", ".zip"), 40 array("\\bar.zip\\", ".zip"), 43 array("\\bar.zip\\", ".zip"), 46 array("\\.zip", ".zip"), 47 array(".zip", ".zip"), 48 array("\\foo\\.zip", ".zip"), [all …]
|