ZipArchive::setCommentName
Set the comment of an entry defined by its name
&reftitle.description;
mixedZipArchive::setCommentName
stringname
stringcomment
Set the comment of an entry defined by its name.
&reftitle.parameters;
name
Name of the entry.
comment
The contents of the comment.
&reftitle.returnvalues;
&return.success;
&reftitle.examples;
Open an archive and set a comment for an entry
open('test.zip');
if ($res === TRUE) {
$z->setCommentName('entry1.txt', 'new entry comment');
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>
]]>