PHP code example of fogacasammuel / extractzip

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

    

fogacasammuel / extractzip example snippets




ogacaSammuel\ExtractZip\Zip;

//Extraindo arquivo zip
$zip = (new Zip(__DIR__ . "/testzip.zip", __DIR__))->execute()->finish();
var_dump($zip->callback());



ogacaSammuel\ExtractZip\Config;

$pathjson = __DIR__ . "/config.json";

$config = (new Config($pathjson, __DIR__))->execute();
if($config->callback()["error"]) {
    echo $config->callback()["message"];
}

echo $config->callback()["message"];