Skip to content

Instantly share code, notes, and snippets.

@sobujbd
Forked from trajche/unzip.php
Created November 14, 2017 05:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Unzip a file on one.com with PHP
<?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