HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //opt/remi/php83/root/usr/share/doc/pecl/zip/examples/addglob.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();