Download the PHP package csesumonpro/phpzipmaker without Composer
On this page you can find all versions of the php package csesumonpro/phpzipmaker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download csesumonpro/phpzipmaker
More information about csesumonpro/phpzipmaker
Files in csesumonpro/phpzipmaker
Package phpzipmaker
Short Description Php zip maker is a simple archive generator composer package. This package can make an archive with selected files & folders and deselect files & folders. This package also provides facilities to set the archive name, extension, and directory where you want to generate the archive.
License MIT
Informations about the package phpzipmaker
PHP Zip Maker
Php zip maker is a simple library to create archive for your project with the selected file or folder.
Installation
Install the package through Composer.
For PHP 5.6 or 5.6~:
composer require csesumonpro/phpzipmaker
Note: If your project doesn't have any composer.json file, you can use it by downloading the zip file from the github repository.
Configuration
Just need to set an .xml file in your project root with the following code: and the name must be phpzipmaker.xml
XML Description
archiveName - The name of the archive file. (optional) It will automatically get the name of your project when you do not provide any name.
archiveExtension - The extension of the archive file. (optional) It will automatically set .zip extension when you do not provide any extension.
Supported Extensions:
archiveFormDirectory - The directory of the archive file. (optional) It will automatically get the directory path of your project when you do not provide any directory path.
archiveToDirectory - The directory where the archive file will be saved. (optional) It will automatically get the directory path of your project when you do not provide any directory path.
include-file - The file that you want to include in the archive file. (required)
exclude-file - The file that you want to exclude in the archive file. (optional)
include-directory - The directory that you want to include in the archive file. (optional)
exclude-directory - The directory that you want to exclude in the archive file. (optional)
Usage
It's very easy to make an archive through the above XML config just run the below command from your project root.
php ./vendor/csesumonpro/phpzipmaker/phpzipmaker.php
UseCase
Suppose you have a project with the following structure:
If you want to include a file just use it like this:
If you want to include a file from a directory that directory already excluded you can do it
if you want to include a directory which directory have many other files and directory
if you want to exclude a file from an included directory you can do it
If you want to exclude a directory that directory already included you can do it
Reference
License
The php zip maker is an open-sourced software licensed under the MIT license