PHP Classes

PHP Create ZIP File Folder: Create ZIP archive with the files of a directory

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-10 (3 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 555 All time: 5,481 This week: 131Up
Version License PHP version Categories
zip-converter 1.9GNU General Publi...5.3PHP 5, Files and Folders, Compression


This class can create ZIP archive with the files of a directory.

It can list the files in one or more given folders and creates a ZIP archive with files in those folders.

The class can optionally traverse the specified folders recursively.

The resulting ZIP archive is stored in a file with a given path.

Picture of Tariqul Islam
  Performance   Level  
Name: Tariqul Islam <contact>
Classes: 3 packages by
Country: Bangladesh Bangladesh
Age: 44
All time rank: 190127 in Bangladesh Bangladesh
Week rank: 321 Up9 in Bangladesh Bangladesh Up


Convert the folder to ZIP
convert the folder to ".zip" format in php


require 'zipconverter.php';

$zip = new zipConverter();
$zip->setRecursiveness(true); //default is false
'./', //path of the current file
'F:\wamp2\www\yml', //Windows Path
'/var/www/html' //linux path
$zip->setZipPath('./'); //Set your Zip Path with your Zip File's Name
$result = $zip->createArchive();

"<pre>";var_dump($result);echo "</pre>";

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example File
Plain text file zipconverter.php Class Main Class File

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,481
This week:131Up