xref: /PHP-7.0/ext/zip/examples/addglob.php (revision 5dc37b35)
1<?php
2
3$z = new ZipArchive;
4$z->open('a.zip', ZIPARCHIVE::CREATE);
5
6/* or 'remove_all_path' => 0*/
7$options = array(
8	'remove_path' => '/home/francis/myimages',
9	'add_path' => 'images/',
10);
11$found = $z->addGlob("/home/pierre/cvs/gd/libgd/tests/*.png", 0, $options);
12var_dump($found);
13$z->close();
14
15