jazor/zip-store

v1.0.3 2022-05-23 05:50 UTC

This package is auto-updated.

Last update: 2024-10-13 04:21:10 UTC


README

zip store for php

only create store, with no compression.

$zip = new ZipStore();

//simple file
$zip->addFile("{$base}store.txt");

//file with extra name
$zip->addFile("{$base}extra.txt", 'files/extra.txt');
$zip->addFile("{$base}你好.txt", 'files/你好.txt');

//directory with base name
$zip->addDirectory("{$base}files", 'extra-files');

//raw contents
$zip->addContents('i am hello world!', 'my name.jpg');

//save to file
$zip->save("{$base}dest.zip");

//or send to client
//$zip->send('dest.zip');