mirror of
https://github.com/php/php-src.git
synced 2024-12-11 19:04:38 +08:00
5dc37b3510
- update libzip to version 1.11.1. We don't use any private symbol anymore - new method ZipArchive::setPassword($password) - add --with-libzip option to build with system libzip
15 lines
298 B
PHP
15 lines
298 B
PHP
<?php
|
|
|
|
$z = new ZipArchive;
|
|
$z->open('a.zip', ZIPARCHIVE::CREATE);
|
|
|
|
/* or 'remove_all_path' => 0*/
|
|
$options = array(
|
|
'remove_path' => '/home/francis/myimages',
|
|
'add_path' => 'images/',
|
|
);
|
|
$found = $z->addGlob("/home/pierre/cvs/gd/libgd/tests/*.png", 0, $options);
|
|
var_dump($found);
|
|
$z->close();
|
|
|