PHP Classes

File: tests/MergeZip.Example1.php

Recommend this page to a friend!
  Classes of Asbjorn Grandt   PHP Zip Merge   tests/MergeZip.Example1.php   Download  
File: tests/MergeZip.Example1.php
Role: Example script
Content type: text/plain
Description: Example showing the use of the ZipMerge Class
Class: PHP Zip Merge
Merge and stream multiple ZIP files
Author: By
Last change: Update of tests/MergeZip.Example1.php
Date: 2 months ago
Size: 518 bytes
 

Contents

Class file image Download
<?php
error_reporting
(E_ALL | E_STRICT);
ini_set('error_reporting', E_ALL | E_STRICT);
ini_set('display_errors', 1);

include
"../vendor/autoload.php";

$outFile = "ZipMerge.test1.zip";

$zipMerge = new \ZipMerge\Zip\Stream\ZipMerge($outFile);
$zipMerge->appendZip("../testData/500k.zip", "TrueCryptRandomFile/");
$zipMerge->appendZip("../testData/test.zip", "A-book");
/*
$handle = fopen("ZipStreamExample1.zip", 'r');
$zipMerge->appendZip($handle, "ZipStreamExample1.zip");
fclose($handle);
*/
$zipMerge->finalize();