Skip to content

Instantly share code, notes, and snippets.

@sobujbd
Forked from trajche/unzip.php
Created Nov 14, 2017
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