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