-
-
Save kimtrien/534c6130876d12ab6d9d39dcea46a262 to your computer and use it in GitHub Desktop.
Unzip a file on one.com with PHP
This file contains 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 | |
$unzip = new ZipArchive; | |
$out = $unzip->open('file-name.zip'); | |
if ($out === TRUE) { | |
$unzip->extractTo(getcwd()); | |
$unzip->close(); | |
echo 'File unzipped'; | |
} else { | |
echo 'Something went wrong?'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment