RsD0p9BK
9/12/2017 - 4:14 AM

php__zip_archive.php

// Creating a zip file with PHP's ZipArchive

$zip = new ZipArchive();
$zip->open('path/to/zipfile.zip', ZipArchive::CREATE);
 
$zip->addFile('some-file.pdf', 'subdir/filename.pdf');
$zip->addFile('another-file.xlxs', 'filename.xlxs');
 
$zip->close();

// https://akrabat.com/creating-a-zip-file-with-phps-ziparchive/