/ Published in: PHP

Unzip a ZIP FILE FOLDER on a server using PHP - shortest code yet.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $zip = new ZipArchive; $res = $zip->open('sc.zip'); if ($res === TRUE) { $zip->extractTo('sc/'); $zip->close(); echo 'ok'; } else { echo 'failed'; } ?>
Comments
