Nav-Appaiya
6/24/2015 - 7:57 PM

PHP Unzipper in a few lines, very sweet!

PHP Unzipper in a few lines, very sweet!

<?php
$unzip = new ZipArchive;
$out = $unzip->open('wordpress-4.2.2-nl_NL.zip');

if ($out === TRUE) {
  $unzip->extractTo(getcwd());
  $unzip->close();
  echo 'File unzipped';
} else {
  echo 'Something went wrong?';
}

?>