Created
July 26, 2013 18:16
-
-
Save doitlikejustin/6091022 to your computer and use it in GitHub Desktop.
Unzip ZIP file on server using 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 | |
$zip = new ZipArchive; | |
$res = $zip->open('./unzip.zip'); | |
if($res === TRUE) { | |
$zip->extractTo('./'); | |
$zip->close(); | |
echo 'woot!'; | |
} else { | |
echo 'doh!'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment