$zip = new ZipArchive(); $zip->open('example.zip', ZipArchive::CREATE); $zip->setArchiveComment('This is a comment for the archive.'); $zip->close();
$zip = new ZipArchive(); $zip->open('example.zip'); $zip->setArchiveComment('This is a new comment for the archive.'); $zip->close();This example opens an existing ZIP archive, updates its comment, and closes it. Package library: PHP ZipArchive Class