summaryrefslogtreecommitdiff
path: root/ext/zip/examples/addglob.php
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zip/examples/addglob.php')
-rw-r--r--ext/zip/examples/addglob.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/zip/examples/addglob.php b/ext/zip/examples/addglob.php
new file mode 100644
index 0000000000..790312b4d5
--- /dev/null
+++ b/ext/zip/examples/addglob.php
@@ -0,0 +1,14 @@
+<?php
+
+$z = new ZipArchive;
+$z->open('a.zip', ZIPARCHIVE::CREATE);
+
+/* or 'remove_all_path' => 0*/
+$options = array(
+ 'remove_path' => '/home/francis/myimages',
+ 'add_path' => 'images/',
+);
+$found = $z->addGlob("/home/pierre/cvs/gd/libgd/tests/*.png", 0, $options);
+var_dump($found);
+$z->close();
+