Mar 26, 2013

PHP - Unzip an uploaded file using php

<?php

$zip = new ZipArchive;
$res = $zip->open('my_zip_file.zip');
if ($res === TRUE) {
$zip->extractTo('my_extract_to_dir/');
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>

SOURCE

No comments: