1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/zip/examples/addpattern.php
Gabriel Caruso 4aabfe911e Revert "Update versions for PHP 8.0.21"
This reverts commit 6eedacdf15.
2022-07-06 12:06:48 +02:00

13 lines
312 B
PHP

<?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();