ZipArchive() not working on AWS EC2 with linux php
i am trying to use ZipArchive but application crash at this code , so is there anything i missing
$zip = new ZipArchive;
if ($zip->open(getcwd() . '/today.zip', ZipArchive::CREATE) === TRUE) {
$zip->addFile(getcwd() . '/filetest2.txt', 'filetest.txt');
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
i am using AWS EC2 LINUX