Home
last modified time | relevance | path

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

1234567891011

/PHP-8.0/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');
11 $file = $dirname . 'oo_setcomment.zip';
15 $zip = new ZipArchive;
24 var_dump($zip->setCommentIndex($zip->lastId, 'entry4.txt'));
26 var_dump($zip->setCommentIndex($zip->lastId, 'entry5.txt'));
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));
[all …]
H A Doo_getnameindex.phpt5 if(!extension_loaded('zip')) die('skip');
11 $file = $dirname . 'oo_getnameindex.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 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_unchangeIndex.phpt11 copy($dirname.'test.zip', $file);
15 $zip = new ZipArchive();
16 $zip->open($file);
17 var_dump($zip->getNameIndex(0));
18 var_dump($zip->getCommentIndex(0));
23 var_dump($zip->getNameIndex(0));
24 var_dump($zip->getCommentIndex(0));
26 $zip->unchangeIndex(0);
28 var_dump($zip->getNameIndex(0));
29 var_dump($zip->getCommentIndex(0));
[all …]
H A Doo_unchangeName.phpt11 copy($dirname.'test.zip', $file);
15 $zip = new ZipArchive();
16 $zip->open($file);
17 var_dump($zip->getNameIndex(0));
18 var_dump($zip->getCommentIndex(0));
23 var_dump($zip->getNameIndex(0));
24 var_dump($zip->getCommentIndex(0));
26 $zip->unchangeName('baz filename');
28 var_dump($zip->getNameIndex(0));
29 var_dump($zip->getCommentIndex(0));
[all …]
H A Doo_delete.phpt10 $file = $dirname . 'oo_delete.zip';
15 $zip = new ZipArchive;
24 $zip->close();
27 var_dump($zip);
35 if ($zip->deleteIndex(0)) {
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_namelocate.phpt5 if(!extension_loaded('zip')) die('skip');
11 $file = $dirname . 'oo_namelocate.zip';
15 $zip = new ZipArchive;
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'));
38 $zip->close();
[all …]
H A Doo_addemptydir.phpt5 if(!extension_loaded('zip')) die('skip');
12 $file = $dirname . 'oo_addemptydir.zip';
14 copy($dirname . 'test.zip', $file);
16 $zip = new ZipArchive;
17 if (!$zip->open($file)) {
22 $zip->addEmptyDir('emptydir');
23 var_dump($zip->lastId); // 4
24 $zip->addEmptyDir('emptydir');
27 var_dump($zip->lastId); // 4
29 if (!verify_entries($zip, [
[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_add_encoding.phpt6 if(!extension_loaded('zip')) die('skip');
13 $file = $dirname . 'tmp.zip';
16 $zip = new ZipArchive;
17 if (!$zip->open($file, ZipArchive::CREATE)) {
21 $zip->addEmptyDir('foo');
23 $zip->addEmptyDir('è', ZipArchive::FL_ENC_UTF_8);
25 $zip->addFromString('bar', __FILE__);
29 if ($zip->status == ZIPARCHIVE::ER_OK) {
30 dump_entries_name($zip);
31 $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_addfile.phpt5 if(!extension_loaded('zip')) die('skip');
12 $file = $dirname . 'oo_addfile.zip';
14 copy($dirname . 'test.zip', $file);
16 $zip = new ZipArchive;
17 if (!$zip->open($file)) {
20 var_dump($zip->lastId);
24 var_dump($zip->lastId);
28 var_dump($zip->lastId);
30 if (!verify_entries($zip, [
42 $zip->close();
[all …]
H A Doo_rename.phpt5 if(!extension_loaded('zip')) die('skip');
11 $file = $dirname . '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 if (!verify_entries($zip, [
53 if (!verify_entries($zip, [
[all …]
H A Doo_setmtime.phpt6 if(!extension_loaded('zip')) die('skip');
19 $zip = new ZipArchive;
31 $s = $zip->statName('foo');
34 $s = $zip->statName('foo');
38 $s = $zip->statIndex(1);
41 $s = $zip->statIndex(1);
47 $zip->close();
49 if (!$zip->open($file)) {
55 $s = $zip->statIndex(0);
59 $s = $zip->statName('bar');
[all …]
H A Dbug81490.phpt5 if (!extension_loaded("zip")) die("skip zip extension not available");
9 $zip = new ZipArchive();
10 $zip->open(__DIR__ . "/bug81490.zip", ZipArchive::CREATE|ZipArchive::OVERWRITE);
11 $zip->addFromString("", "yada yada");
13 $zip->open(__DIR__ . "/bug81490.zip");
14 $zip->extractTo(__DIR__ . "/bug81490", "");
19 @unlink(__DIR__ . "/bug81490.zip");
H A Doo_add_from_string.phpt6 if(!extension_loaded('zip')) die('skip');
13 $file = $dirname . 'tmp.zip';
16 copy(__DIR__ . '/test.zip', $file);
18 $zip = new ZipArchive();
19 if (!$zip->open($file)) {
25 var_dump($zip->status == ZipArchive::ER_OK);
31 var_dump($zip->status == ZipArchive::ER_OK);
33 if ($zip->status == ZipArchive::ER_OK) {
34 dump_entries_name($zip);
35 $zip->close();
[all …]
/PHP-8.0/ext/phar/tests/zip/
H A Dcorrupt_008.phpt84 … unsupported compression method (Shrunk) used in this zip in zip-based phar "%scompress_unsup1.zip"
85 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup2.zip"
86 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup3.zip"
87 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup4.zip"
88 … unsupported compression method (Reduce) used in this zip in zip-based phar "%scompress_unsup5.zip"
89 …unsupported compression method (Implode) used in this zip in zip-based phar "%scompress_unsup6.zip"
90 …nsupported compression method (Tokenize) used in this zip in zip-based phar "%scompress_unsup7.zip"
91 …supported compression method (Deflate64) used in this zip in zip-based phar "%scompress_unsup9.zip"
93 …r: unsupported compression method (LZMA) used in this zip in zip-based phar "%scompress_unsup14.zi…
96 …unsupported compression method (WavPack) used in this zip in zip-based phar "%scompress_unsup97.zi…
[all …]
/PHP-8.0/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-8.0/ext/standard/tests/file/
H A Dbasename-win32.phpt31 array("bar.zip", ".zip"),
32 array("bar.zip", "bar.zip"),
34 array("foo\\bar.zip", ".zip"),
35 array("\\bar.zip", ".zip"),
38 array("bar.zip\\", ".zip"),
39 array("\\bar.zip\\", ".zip"),
42 array("\\bar.zip\\", ".zip"),
45 array("\\.zip", ".zip"),
46 array(".zip", ".zip"),
47 array("\\foo\\.zip", ".zip"),
[all …]

Completed in 27 milliseconds

1234567891011