Home
last modified time | relevance | path

Searched refs:zip (Results 1 – 25 of 226) sorted by relevance

12345678910

/PHP-7.3/ext/zip/tests/
H A Doo_properties.phpt15 $zip = new ZipArchive;
20 printf("zip->status (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->status, empty($zip->status), isse…
21 printf("zip->numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->numFiles, empty($zip->numFiles)…
22 printf("zip->bogus (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->bogus, empty($zip->bogus), isset($
27 printf("zip->status (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->status, empty($zip->status), isse…
28 printf("zip->numFiles (%d):\n\tempty(): %d\n\tisset(): %d\n", $zip->numFiles, empty($zip->numFiles)…
29 printf("zip->filename (%d):\n\tempty(): %d\n\tisset(): %d\n", strlen($zip->filename), empty($zip->f…
30 printf("zip->comment (%d):\n\tempty(): %d\n\tisset(): %d\n", strlen($zip->comment), empty($zip->com…
36 zip->status (0):
44 zip->bogus (0):
[all …]
H A Doo_setcomment.phpt5 if(!extension_loaded('zip')) die('skip');
15 $zip = new ZipArchive;
37 echo "failed to write zip\n";
39 $zip->close();
41 if (!$zip->open($file)) {
46 var_dump($zip->getCommentIndex(0));
47 var_dump($zip->getCommentIndex(1));
48 var_dump($zip->getCommentIndex(2));
49 var_dump($zip->getCommentIndex(3));
50 var_dump($zip->getCommentIndex(4));
[all …]
H A Dbug47667.phpt5 if(!extension_loaded('zip')) die('skip');
10 $filename = $thisdir . "/bug47667.zip";
12 $zip = new ZipArchive();
14 exit("Unable to open the zip file");
17 $zip->close();
21 $zip = new ZipArchive();
26 $zip->close();
29 $zip = new ZipArchive();
31 exit("Unable to open the zip file");
34 echo "files: " , $zip->numFiles;
[all …]
H A Doo_delete.phpt15 $zip = new ZipArchive;
24 $zip->close();
27 var_dump($zip);
35 if ($zip->deleteIndex(0)) {
51 if (!$zip->deleteIndex(123)) {
54 print_r($zip);
59 $sb = $zip->statIndex(0);
61 $sb = $zip->statIndex(1);
63 $sb = $zip->statIndex(2);
66 @$zip->close();
[all …]
H A Doo_getnameindex.phpt5 if(!extension_loaded('zip')) die('skip');
11 $file = $dirname . '__tmp_oo_rename.zip';
15 $zip = new ZipArchive;
25 echo "failed to write zip\n";
27 $zip->close();
29 if (!$zip->open($file)) {
34 var_dump($zip->getNameIndex(0));
35 var_dump($zip->getNameIndex(1));
36 var_dump($zip->getNameIndex(2));
37 var_dump($zip->getNameIndex(3));
[all …]
H A Doo_setcompression.phpt5 if (!extension_loaded('zip')) die('skip');
16 $zip = new ZipArchive;
21 $zip->addFromString('entry1.txt', $txt);
22 $zip->addFromString('entry2.txt', $txt);
24 $zip->addFromString('entry4.txt', $txt);
25 $zip->addFromString('entry5.txt', $txt);
37 if (!$zip->close()) {
43 $zip = zip_open($tmpfile);
44 if (!is_resource($zip)) {
48 while ($e = zip_read($zip)) {
[all …]
H A Doo_namelocate.phpt5 if(!extension_loaded('zip')) die('skip');
11 $file = $dirname . '__tmp_oo_rename.zip';
15 $zip = new ZipArchive;
16 if (!$zip->open($file, ZIPARCHIVE::CREATE)) {
24 if (!$zip->status == ZIPARCHIVE::ER_OK) {
25 echo "failed to write zip\n";
27 $zip->close();
29 if (!$zip->open($file)) {
34 var_dump($zip->locateName('entry1.txt'));
35 var_dump($zip->locateName('eNtry2.txt'));
[all …]
H A Dbug70103.phpt5 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 Doo_encryption.phpt5 if (!extension_loaded('zip')) die('skip');
11 $name = __DIR__ . '/encrypted.zip';
15 $zip = new ZipArchive;
18 $zip->addFromString('foo.txt', 'foo');
20 $zip->addFromString('bar.txt', 'bar');
23 $zip->close();
26 $r = $zip->open($name);
27 $s = $zip->statName('foo.txt');
29 $s = $zip->statName('bar.txt');
33 $zip->setPassword($pass);
[all …]
H A Doo_externalattributes.phpt5 if (!extension_loaded('zip')) die('skip');
10 $name = __DIR__ . '/withattr.zip';
13 $zip = new ZipArchive;
15 $zip->addFromString('foo.txt', 'foo');
16 $zip->addFromString('bar.txt', 'bar');
18 $id = $zip->locateName('bar.txt');
20 $zip->close();
23 $r = $zip->open($name);
25 $id = $zip->locateName('bar.txt');
38 $zip->close();
[all …]
H A Doo_rename.phpt5 if(!extension_loaded('zip')) die('skip');
11 $file = $dirname . '__tmp_oo_rename.zip';
15 $zip = new ZipArchive;
16 if (!$zip->open($file, ZIPARCHIVE::CREATE)) {
24 if (!$zip->status == ZIPARCHIVE::ER_OK) {
25 var_dump($zip);
29 $zip->close();
31 if (!$zip->open($file)) {
35 dump_entries_name($zip);
45 dump_entries_name($zip);
[all …]
H A Dstream_meta_data.phpt2 stream_get_meta_data() on zip stream
5 if(!extension_loaded('zip')) die('skip');
12 $zip = new ZipArchive;
13 if (!$zip->open($file)) {
16 $fp = $zip->getStream('foo');
23 $zip->close();
26 $fp = fopen('zip://' . dirname(__FILE__) . '/test_with_comment.zip#foo', 'rb');
44 string(3) "zip"
62 string(11) "zip wrapper"
64 string(3) "zip"
[all …]
H A Ddoubleclose.phpt5 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 Doo_addfile.phpt5 if(!extension_loaded('zip')) die('skip');
12 $file = $dirname . '__tmp_oo_addfile.zip';
14 copy($dirname . 'test.zip', $file);
16 $zip = new ZipArchive;
17 if (!$zip->open($file)) {
20 if (!$zip->addFile($dirname . 'utils.inc', 'test.php')) {
26 if ($zip->status == ZIPARCHIVE::ER_OK) {
27 dump_entries_name($zip);
28 $zip->close();
32 if (!$zip->open($file)) {
[all …]
H A Doo_getcomment.phpt5 if(!extension_loaded('zip')) die('skip');
10 $file = $dirname . 'test_with_comment.zip';
12 $zip = new ZipArchive;
13 if (!$zip->open($file)) {
16 echo $zip->getArchiveComment() . "\n";
18 $idx = $zip->locateName('foo');
19 echo $zip->getCommentName('foo') . "\n";
20 echo $zip->getCommentIndex($idx);
22 echo $zip->getCommentName('') . "\n";
23 echo $zip->getCommentName() . "\n";
[all …]
H A Doo_addemptydir.phpt5 if(!extension_loaded('zip')) die('skip');
12 $file = $dirname . '__tmp_oo_addfile.zip';
14 copy($dirname . 'test.zip', $file);
16 $zip = new ZipArchive;
17 if (!$zip->open($file)) {
21 $zip->addEmptyDir('emptydir');
22 if ($zip->status == ZIPARCHIVE::ER_OK) {
23 dump_entries_name($zip);
24 $zip->close();
H A Doo_count.phpt5 if(!extension_loaded('zip')) die('skip');
11 $file = $dirname . 'test.zip';
13 $zip = new ZipArchive;
14 if (!$zip->open($file)) {
18 var_dump($zip->numFiles, count($zip), $zip->numFiles == count($zip));
/PHP-7.3/ext/phar/tests/zip/
H A Dcorrupt_008.phpt85 … unsupported compression method (Shrunk) used in this zip in zip-based phar "%scompress_unsup1.zip"
86 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup2.zip"
87 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup3.zip"
88 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup4.zip"
89 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup5.zip"
90 …unsupported compression method (Implode) used in this zip in zip-based phar "%scompress_unsup6.zip"
91 …nsupported compression method (Tokenize) used in this zip in zip-based phar "%scompress_unsup7.zip"
92 …supported compression method (Deflate64) used in this zip in zip-based phar "%scompress_unsup9.zip"
94 …r: unsupported compression method (LZMA) used in this zip in zip-based phar "%scompress_unsup14.zi…
97 …unsupported compression method (WavPack) used in this zip in zip-based phar "%scompress_unsup97.zi…
[all …]
H A Dunixzip.phpt2 Phar: test a zip archive created by unix "zip" command
7 $a = new PharData(dirname(__FILE__) . '/files/zip.zip');
22 dir phar://%s/zip.zip%cempty
23 phar://%s/zip.zip%chi.txt
26 dir phar://%s/zip.zip%cnotempty
27 phar://%s/zip.zip/notempty%chi.txt
/PHP-7.3/ext/zip/examples/
H A DextractAll.php2 $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 Dextract.php6 $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 Dencryption.php13 $zip = new ZipArchive; variable
15 $zip->addFile(__FILE__, $file);
17 $zip->close();
21 $zip = new ZipArchive; variable
23 $zip->setPassword($pass);
24 $zip->addFile(__FILE__, $file);
26 $zip->close();
30 $zip->open($name);
31 print_r($zip->statName($file));
35 $zip->setPassword($pass);
[all …]
H A Dcreate.php8 $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 Dset_compression.php7 $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.3/ext/standard/tests/file/
H A Dbasename-win32.phpt32 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 …]

Completed in 28 milliseconds

12345678910