ZipArchive::setCommentIndex
Set the comment of an entry defined by its index
&reftitle.description;
mixedZipArchive::setCommentIndex
intindex
stringcomment
Set the comment of an entry defined by its index.
&reftitle.parameters;
index
Index 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) {
$zip->setCommentIndex(2, 'new entry comment');
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>
]]>