What would cause this error:
Fatal error: Class 'ZipArchive' not found in /home/test/dummyurl.com/wp-content/themes/mytheme/upload-zip.php on line 14
PHP Version is 5.3.1
Does WP have a built in function I should use instead? Like perhaps the "unzip_file" function line 525 of ./wp-admin/includes/file.php"?
function openZip($file_to_open) {
global $target;
$zip = new ZipArchive(); //This is line 14
$x = $zip->open($file_to_open);
if($x === true) {
$zip->extractTo($target);
$zip->close();
unlink($file_to_open);
} else {
die("There was a problem. Please try again!");
}
}