Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function extractZip($zipName, $newLocation) {
- $zip = new ZipArchive;
- if ($zip->open($zipName) === TRUE) {
- if (substr($newLocation, -1) != '/')
- $newLocation .= '/';
- if (!file_exists($newLocation))
- mkdir($newLocation);
- return $zip->extractTo($newLocation);
- $zip->close();
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement