Skip to content

Instantly share code, notes, and snippets.

@curtisblackwell
Created June 24, 2012 08:05
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 curtisblackwell/2982380 to your computer and use it in GitHub Desktop.
Save curtisblackwell/2982380 to your computer and use it in GitHub Desktop.
FTP .zip
<?php
$zip = new ZipArchive;
$res = $zip->open('FILE_NAME.zip');
if ($res === TRUE) {
$zip->extractTo(dirname(__FILE__)); // Same dir
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment