Closed ImNotDeveloper closed 4 years ago
Creates empty zip file:
<?php
require __DIR__ . '/vendor/autoload.php';
$outputFile = '/tmp/empty_zip_file.zip';
$zipFile = new \PhpZip\ZipFile();
$zipFile->saveAsFile($outputFile);
$zipFile->close();
Checking result:
zipinfo /tmp/empty_zip_file.zip
Result:
Archive: /tmp/empty_zip_file.zip
Zip file size: 22 bytes, number of entries: 0
Empty zipfile.
I don't understand this much. I want to create an empty zip file in a specific directory, but I'm not doing it