Home
last modified time | relevance | path

Searched refs:zip (Results 51 – 75 of 257) sorted by relevance

1234567891011

/PHP-8.0/ext/zip/tests/
H A Doo_cancel.phpt6 if(!extension_loaded('zip')) die('skip');
14 $file = $dirname . '__tmp_oo_progress.zip';
18 $zip = new ZipArchive;
19 if (!$zip->open($file, ZIPARCHIVE::CREATE)) {
23 var_dump($zip->registerCancelCallback(function () {
27 var_dump($zip->addFromString(PHP_BINARY, 'entry #1'));
29 var_dump($zip->close());
30 var_dump($zip->status == ZipArchive::ER_CANCELLED);
31 var_dump($zip->getStatusString());
H A Doo_addglob2.phpt5 if(!extension_loaded('zip')) die('skip');
15 $file = $dirname . 'test.zip';
21 $zip = new ZipArchive();
28 if (!$zip->addGlob($dirname . 'foo.*', GLOB_BRACE, $options)) {
39 if (!$zip->addGlob($dirname . 'bar.*', GLOB_BRACE, $options)) {
42 if ($zip->status == ZIPARCHIVE::ER_OK) {
43 $zip->close();
45 $zip = new ZipArchive();
46 $zip->open($file);
47 for($i=0; $i<$zip->numFiles; $i++) {
[all …]
H A Dbug64342_1-mb.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 . 'cant_find_me.txt', 'test.php')) {
23 if ($zip->status == ZIPARCHIVE::ER_OK) {
24 if (!verify_entries($zip, [
34 $zip->close();
H A Dbug64342_1.phpt5 if(!extension_loaded('zip')) die('skip');
12 $file = $dirname . 'bug64342_1.zip';
14 copy($dirname . 'test.zip', $file);
16 $zip = new ZipArchive;
17 if (!$zip->open($file)) {
20 if (!$zip->addFile($dirname . 'cant_find_me.txt', 'test.php')) {
23 if ($zip->status == ZIPARCHIVE::ER_OK) {
24 if (!verify_entries($zip, [
34 $zip->close();
H A Dbug7658.phpt5 if(!extension_loaded('zip')) die('skip');
29 $zip = new ZipArchive();
31 if(!$zip->open($file)) {
36 $zip->deleteName('content.xml');
37 $zip->addFile($dirname . "bug7658.xml","content.xml");
38 $zip->close();
40 $zip->open($file);
42 for($i=0; $i < $zip->numFiles; $i++) {
43 $sb = $zip->statIndex($i);
49 unset($zip);
H A Dbug72374.phpt5 if(!extension_loaded('zip')) die('skip');
19 $zip = new ZipArchive();
20 $zip->open($dirname . '/test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE);
21 $zip->addGlob($file1, 0, array('remove_path' => $dirname . '/some-'));
22 $zip->addGlob($file1, 0, array('remove_path' => $dirname . '/'));
23 $zip->addGlob($file2, 0, array('remove_path' => $dirname));
24 verify_entries($zip, ['foo.txt', 'some-foo.txt', 'some-bar.txt']);
25 $zip->close();
H A Dbug53579.phpt5 if(!extension_loaded('zip')) die('skip');
10 $file = $dirname . 'test_with_comment.zip';
12 $zip = new ZipArchive;
13 if (!$zip->open($file)) {
16 $fp = $zip->getStream('foo');
23 $zip->close();
27 $fp = fopen('zip://' . __DIR__ . '/test_with_comment.zip#foo', 'rb');
H A Dbug72660.phpt5 if(!extension_loaded('zip')) die('skip');
10 $zip = new ZipArchive();
11 $zip->open(__DIR__ . "/bug72660.zip", ZIPARCHIVE::CREATE);
12 $zip->addPattern("/noexists/");
17 @unlink(__DIR__ . "/bug72660.zip");
H A Doo_stream.phpt5 if(!extension_loaded('zip')) die('skip');
10 $file = $dirname . 'test_with_comment.zip';
12 $zip = new ZipArchive;
13 if (!$zip->open($file)) {
16 $fp = $zip->getStream('foo');
26 $zip->close();
30 $fp = fopen('zip://' . __DIR__ . '/test_with_comment.zip#foo', 'rb');
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 Dbug50678.phpt5 if (!extension_loaded('zip')) die('skip zip extension not available');
11 $filename = __DIR__ . '/test.zip';
16 $zip = new ZipArchive();
17 $zip->open($filename);
18 $zip->extractTo($dirname);
19 $zip->close();
H A Dcompression_methods.phpt5 libzip, but for now only 6 methods are available in compression_methods.zip.
6 The zip and the test should be extended, if possible.
9 if (!extension_loaded('zip')) die('skip zip extension not available');
21 $zip = new ZipArchive();
22 $zip->open(__DIR__ . '/compression_methods.zip');
25 var_dump($zip->statName($filename)['comp_method'] === $method);
27 $zip->close();
H A Dbug72258.phpt5 if(!extension_loaded('zip')) die('skip');
10 $fn = __DIR__ . DIRECTORY_SEPARATOR . "bug72258.zip";
12 $zip = new \ZipArchive();
13 $res = $zip->open($fn);
19 for ($i = 0; $i < $zip->numFiles; $i++) {
20 $fnInArc = $zip->getNameIndex($i, ZipArchive::FL_ENC_RAW);
H A Dbug81420.phpt5 if (!extension_loaded("zip")) die("skip zip extension not available");
9 $zip = new ZipArchive();
10 $zip->open(__DIR__ . "/bug81420.zip");
13 $zip->extractTo($destination);
H A Dbug70322.phpt9 if (!extension_loaded('zip')) die('skip requires zip extension');
13 $zipfile = __DIR__ . '/bug70322.zip';
16 $zip = new ZipArchive();
17 $zip->open($zipfile, ZipArchive::CREATE);
18 $zip->addFile($textfile);
20 var_dump($zip->close());
25 @unlink(__DIR__ . '/bug70322.zip');
H A Doo_progress.phpt6 if(!extension_loaded('zip')) die('skip');
14 $file = $dirname . '__tmp_oo_progress.zip';
18 $zip = new ZipArchive;
19 if (!$zip->open($file, ZIPARCHIVE::CREATE)) {
23 var_dump($zip->registerProgressCallback(0.5, function ($r) {
28 var_dump($zip->addFromString('foo', 'entry #1'));
30 var_dump($zip->close());
/PHP-8.0/ext/phar/tests/zip/
H A Dnotphar.phpt2 Phar: a non-executable zip with no stub named .phar.zip
11 $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip';
14 copy(__DIR__ . '/files/zip.zip', $fname);
20 unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
24 …har.phar.zip/.phar/stub.php): Failed to open stream: '%snotphar.phar.zip' is not a phar archive. U…
H A Dbzip2.phpt2 Phar: process bzip2-compressed zip entry
11 $a = new PharData(dirname(__FILE__) . '/files/bzip2.zip');
27 $a->writeZip(dirname(__FILE__) . '/encrypted.zip');
31 $a->writeZip(dirname(__FILE__) . '/stdin.zip');
35 $a->writeZip(dirname(__FILE__) . '/truncfilename.zip');
38 $a->writeZip(dirname(__FILE__) . '/compress_unsup1.zip');
41 $a->writeZip(dirname(__FILE__) . '/compress_unsup2.zip');
44 $a->writeZip(dirname(__FILE__) . '/compress_unsup3.zip');
47 $a->writeZip(dirname(__FILE__) . '/compress_unsup4.zip');
50 $a->writeZip(dirname(__FILE__) . '/compress_unsup5.zip');
[all …]
H A Dalias_acrobatics.phpt10 $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip';
11 $fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip';
37 unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
38 unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip');
41 …ady used for archive "%salias_acrobatics.phar.zip" cannot be overloaded with "%salias_acrobatics.2…
43 phar error: Unable to add zip-based phar "%salias_acrobatics.2.phar.zip" with implicit alias, alias…
44 …eady used for archive "%salias_acrobatics.phar.zip" cannot be overloaded with "%salias_acrobatics.…
H A Dcorrupt_005.phpt2 Phar: encrypted zip
8 new PharData(__DIR__ . '/files/encrypted.zip');
14 phar error: Cannot process encrypted zip files in zip-based phar "%sencrypted.zip"
H A Dgetalias.phpt2 Phar: getAlias() with an existing phar.zip
11 $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip';
13 // sanity check with a virgin phar.zip
18 copy(__DIR__ . '/files/metadata.phar.zip', $fname);
20 // existing phar.zip, no alias set
29 // existing phar.zip, alias set
48 unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip');
52 string(%d) "%sgetalias.phar.zip"
53 string(%d) "%sgetalias.phar.zip"
56 Cannot set alias ".phar/alias.txt" directly in phar "%sgetalias.phar.zip", use setAlias
H A Dcorrupt_002.phpt2 Phar: corrupted zip (no end of zip record)
8 new PharData(__DIR__ . '/files/nozipend.zip');
14 phar error: end of central directory not found in zip-based phar "%snozipend.zip"
/PHP-8.0/ext/zip/
H A Dconfig.w323 ARG_ENABLE("zip", "ZIP support", "yes");
6 …if (CHECK_HEADER_ADD_INCLUDE("zip.h", "CFLAGS_ZIP", PHP_PHP_BUILD + "\\include;" + PHP_EXTRA_INCLU…
8 (PHP_ZIP_SHARED && CHECK_LIB("libzip.lib", "zip", PHP_ZIP) ||
9 ….lib", "zip", PHP_ZIP) && CHECK_LIB("libbz2_a.lib", "zip", PHP_ZIP) && CHECK_LIB("zlib_a.lib", "zi…
11 EXTENSION('zip', 'php_zip.c zip_stream.c');
21 WARNING("zip not enabled; libraries and headers not found");
H A Dconfig.m41 PHP_ARG_WITH([zip],
2 [for zip archive read/write support],
3 [AS_HELP_STRING([--with-zip],
12 PHP_CHECK_LIBRARY(zip, zip_file_set_mtime,
21 PHP_CHECK_LIBRARY(zip, zip_file_set_encryption,
30 PHP_CHECK_LIBRARY(zip, zip_libzip_version,
38 PHP_CHECK_LIBRARY(zip, zip_register_progress_callback_with_state,
46 PHP_CHECK_LIBRARY(zip, zip_register_cancel_callback_with_state,
54 PHP_CHECK_LIBRARY(zip, zip_compression_method_supported,
65 PHP_NEW_EXTENSION(zip, $PHP_ZIP_SOURCES, $ext_shared)
/PHP-8.0/ext/phar/tests/zip/files/
H A Dcorrupt2.php.inc6 $a->writeZip(dirname(__FILE__) . '/encrypted.zip');
10 $a->writeZip(dirname(__FILE__) . '/stdin.zip');
14 $a->writeZip(dirname(__FILE__) . '/truncfilename.zip');
17 $a->writeZip(dirname(__FILE__) . '/compress_unsup1.zip');
20 $a->writeZip(dirname(__FILE__) . '/compress_unsup2.zip');
23 $a->writeZip(dirname(__FILE__) . '/compress_unsup3.zip');
26 $a->writeZip(dirname(__FILE__) . '/compress_unsup4.zip');
29 $a->writeZip(dirname(__FILE__) . '/compress_unsup5.zip');
32 $a->writeZip(dirname(__FILE__) . '/compress_unsup6.zip');
35 $a->writeZip(dirname(__FILE__) . '/compress_unsup7.zip');
[all …]

Completed in 29 milliseconds

1234567891011