Skip to content

Instantly share code, notes, and snippets.

@sobujbd
Forked from trajche/unzip.php
Created November 14, 2017 05:34
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 sobujbd/6ce75f6bb7892aeac42a6ad64ba85a58 to your computer and use it in GitHub Desktop.
Save sobujbd/6ce75f6bb7892aeac42a6ad64ba85a58 to your computer and use it in GitHub Desktop.
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