Created
December 20, 2022 12:20
-
-
Save cukabeka/f302f04aa8ddfccc52b3812acd1d6c8b to your computer and use it in GitHub Desktop.
Simple Server Unzip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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