Archive

Create zip archive with file/folder.

Installation

composer require mediashare/kernel
1

Code

<?php
// ./index.php
require 'vendor/autoload.php';
use Mediashare\Kernel\Kernel;

$kernel = new Kernel();
$kernel->run();
$archive = $kernel->get('Archive');

$archive->setSource(__DIR__.'/images');
$archive->setDestination(__DIR__.'/backup.zip');
$archive->run();
1
2
3
4
5
6
7
8
9
10
11
12
Last Updated: 1/13/2020, 4:17:38 AM