PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Tariqul Islam   PHP Create ZIP File Folder   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example File
Class: PHP Create ZIP File Folder
Create ZIP archive with the files of a directory
Author: By
Last change: Update of example.php
Date: 4 months ago
Size: 432 bytes
 

Contents

Class file image Download
<?php
require 'zipconverter.php';

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

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