Skip to content

Instantly share code, notes, and snippets.

@doitlikejustin
Created July 26, 2013 18:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doitlikejustin/6091022 to your computer and use it in GitHub Desktop.
Save doitlikejustin/6091022 to your computer and use it in GitHub Desktop.
Unzip ZIP file on server using PHP
<?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