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: 64 This week: 8All time: 10,180 This week: 18Up
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: 3 packages by
Country: Switzerland Switzerland
Innovation award
Innovation award
Nominee: 1x

  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:64
This week:8
All time:10,180
This week:18Up