xref: /PHP-8.2/ext/zip/examples/addglob.php (revision 58b17906)
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