i want to Adds an empty directory in the archive.
ZipArchive::addEmptyDir
this function add it
but i the root only
assume i want add it in
/dir/dir/
i cant
<?php
$zip = new ZipArchive;
if ($zip->open('test.zip') === TRUE) {
if($zip->addEmptyDir('newDirectory')) {
echo 'Created a new root directory';
} else {
echo 'Could not create the directory';
}
$zip->close();
} else {
echo 'failed';
}
?>
this add it in the root
how i can add the new dir in sub dir
Source: php.net