blob: 41efaa5eb73a11fc18be6783479953ee3d30336d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
<?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();
|