summaryrefslogtreecommitdiff
path: root/ext/zip/examples/addpattern.php
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2013-11-04 13:23:36 +0100
committerRemi Collet <remi@php.net>2013-11-04 13:23:36 +0100
commit5dc37b351085a7b8cdc30ef2ebb349c8e5df4e2c (patch)
tree33357220b91d8553c0978e6392385e0fb8e49028 /ext/zip/examples/addpattern.php
parent2f555b8e606b5f09d635cef4d3fcbcd6939adae2 (diff)
downloadphp-git-5dc37b351085a7b8cdc30ef2ebb349c8e5df4e2c.tar.gz
Sync ext/zip with pecl/zip version 1.3.2
- update libzip to version 1.11.1. We don't use any private symbol anymore - new method ZipArchive::setPassword($password) - add --with-libzip option to build with system libzip
Diffstat (limited to 'ext/zip/examples/addpattern.php')
-rw-r--r--ext/zip/examples/addpattern.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/zip/examples/addpattern.php b/ext/zip/examples/addpattern.php
new file mode 100644
index 0000000000..a1a9b12291
--- /dev/null
+++ b/ext/zip/examples/addpattern.php
@@ -0,0 +1,13 @@
+<?php
+$z = new ZipArchive;
+$z->open('a.zip', ZIPARCHIVE::CREATE);
+
+/* or 'remove_all_path' => 0*/
+$options = array('remove_path' => '/home/pierre/cvs/gd/libgd/tests',
+'add_path' => 'images/',
+);
+
+$found = $z->addPattern("/(\.png)$/i", "/home/pierre/cvs/gd/libgd/tests", $options);
+var_dump($found);
+$z->close();
+