Saya memiliki masalah yang saya instal 'Archive_Zip 0.1.1' di server Linux, tetapi ketika saya mencoba menjalankan skrip untuk membuat file zip itu memberikan kesalahan fatal
Kesalahan fatal: Kelas
ZipArchivetidak ditemukan di ...
tempat saya meletakkan kode
$zip = new ZipArchive;
var_dump($zip);
$res = $zip->open($filename, ZipArchive::OVERWRITE);
if ($res !== TRUE) {
echo 'Error: Unable to create zip file';
exit;
}
if (is_file($src)) {
$zip->addFile($src);
} else {
// echo "<br>" . dirname(__FILE__) . $src;//'/install1';
if (!is_dir($src)) {
$zip->close();
@unlink($filename);
echo 'Error: File not found';
exit;
}
recurse_zip($src, $zip, $path_length);
}
$zip->close();
echo "<br>file name ".$filename;
tetapi tidak menemukan file kelas.
Tolong beri tahu saya solusinya. Apa yang harus saya lakukan untuk menyelesaikan masalah? Saya juga meletakkan php.inifile ke folder tempat skrip berada, tetapi tidak berfungsi.
E: Unable to locate package php7.2-zip E: Couldn't find any package by regex 'php7.2-zip'menggunakan ubuntu 14.04 dengan php 7.2
apt-get install php-zip.

sudo apt-get install php7.2-zip