PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Muhammad Umer Farooq   PHP ZIP Handler Class   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP ZIP Handler Class
Create and extract ZIP files with compressed data
Author: By
Last change: Apply fixes from StyleCI
Date: 5 years ago
Size: 899 bytes


Class file image Download

require_once 'classes/Zip.php';

$zip = new Zip();

 * //Note if you want manipulate files in outside the root of server / script you may use my file manipulation class here is two possible link
 * Github:
 * Alternative:
 * please fork/rate these classes if you like thanks.
//compress file
$comp = $zip->Compress(
'data/image/one.png', 'data/image/two.png'],
'data/compressed/', false
if (
$comp === true) {
'file successfully compressed ';
} else {
'already / something went wrong ';

//extract file
$ext = $zip->Extract(
'data/compressed/', 'data/extract/'
if (
$ext === true) {
' file extract successfully ';
} else {
' already / something went wrong ';