Skip to content

Instantly share code, notes, and snippets.

@Kcko
Last active December 25, 2015 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kcko/6918495 to your computer and use it in GitHub Desktop.
Save Kcko/6918495 to your computer and use it in GitHub Desktop.
PHP: Unzip folder
<?
$extract_dir = "./sprites/";
$extract_file = "sprites.zip";
$zip = new ZipArchive;
$res = $zip->open($extract_file);
if ($res === TRUE) {
$zip->extractTo($extract_dir);
$zip->close();
echo "OK";
} else {
echo "NOK";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment