Skip to content

Instantly share code, notes, and snippets.

@cukabeka
Created December 20, 2022 12:20
Show Gist options
  • Save cukabeka/f302f04aa8ddfccc52b3812acd1d6c8b to your computer and use it in GitHub Desktop.
Save cukabeka/f302f04aa8ddfccc52b3812acd1d6c8b to your computer and use it in GitHub Desktop.
Simple Server Unzip
<?php
// Open the zip file
$zip = new ZipArchive;
if ($zip->open('input.zip') === TRUE) {
// Extract the file to the specified destination
$zip->extractTo('./');
$zip->close();
echo 'Zip file extracted successfully!';
} else {
echo 'Failed to open the zip file';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment