PHP code example of elibyy / zip

1. Go to this page and download the library: Download elibyy/zip library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

elibyy / zip example snippets


 use Elibyy\Reader
 $reader = new Reader('/path/to/file.zip');
 $reader->getFiles(); #will return File[]
 $reader->addFile('/path/to/file.txt','my/inner/path/file.txt'); #will add a file to the archive with path my/inner/path
 $reader->removeFileByName('file.txt');