PHP Classes

PHP Zip Folder Tree: Creates a ZIP archive with all files from a folder

Recommend this page to a friend!
  Info   View files Example   View files View files (1)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 71 All time: 10,150 This week: 106Up
Version License PHP version Categories
zipfoldertree 1.0Free For Educatio...7PHP 5, Compression, Global
Description 

Author

This package creates a ZIP archive with all files from a folder.

It provides an example script showing how to create a ZIP archive file from files in a folder and any sub-folders the folder may contain.

Usually, PHP installations provide the ZipArchive class with a method to add a globe or add pattern to add multiple files into a zip. In some cases, the add globe is not always working.

This example script uses the ZipArchive, RecursiveDirectoryIterator, and RecursiveIteratorIterator for adding all files in all folders into a zip.

The result is compatible with Windows Explorer Zip.

Picture of Mat Jung
  Performance   Level  
Name: Mat Jung <contact>
Classes: 4 packages by
Country: Switzerland Switzerland
Age: 47
All time rank: 389331 in Switzerland Switzerland
Week rank: 373 Up6 in Switzerland Switzerland Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file ZipFolderTree.php Example zips all files in folder with subfolders

 Version Control Unique User Downloads Download Rankings  
 0%
Total:71
This week:0
All time:10,150
This week:106Up