ZipArchive::setCommentIndex
(PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.4.0)
ZipArchive::setCommentIndex - 设置由其索引定义的条目的注释
描述
bool ZipArchive::setCommentIndex ( int $index , string $comment )
设置由其索引定义的条目的评论。
参数
index
入口索引。
comment
评论的内容。
返回值
成功时返回TRUE
或失败时返回FALSE
。
示例
Example #1 Open an archive and set a comment for an entry
<?php
$zip?=?new?ZipArchive;
$res?=?$zip->open('test.zip');
if?($res?===?TRUE)?{
????$zip->setCommentIndex(2,?'new?entry?comment');
????$zip->close();
????echo?'ok';
}?else?{
????echo?'failed';
}
?>
← ZipArchive::setArchiveComment
ZipArchive::setCommentName →
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com