Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //New ZIP attempt to fix unarchive error
- $zipfile = new zipfile();
- //Loop through directory, zip them all
- if($handle = opendir($zipLocation)){
- while(false!== ($file = readdir($handle))){
- if($file == '.' && $file == '..') continue;
- $zipfile->addFile(file_get_contents($zipLocation.'/'.$file), $file);
- }
- closedir($handle);
- file_put_contents($zipLocation.$zipName, $zipfile->file());
- }
Add Comment
Please, Sign In to add comment