1. Go to this page and download the library: Download devuri/zipit library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
devuri / zipit example snippets
return [
'baseDir' => __DIR__, // The base directory where files are located
'files' => [ // List of files and directories to 'directory1/exclude-this.txt',
'file-to-exclude.txt',
],
'outputDir' => __DIR__ . '/build', // Optional: Custom output directory path
'outputFile' => 'project-archive.zip', // Optional: Custom output file name
];