PHP code example of letnn / zip

1. Go to this page and download the library: Download letnn/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/ */

    

letnn / zip example snippets


use letnn\Zip;

//压缩文件或文件夹
Zip::zipCreate("./assets", "./assets.zip");

//zip解压缩
Zip::zipExport("./assets.zip", null, true);