首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

ZipArchive::setCommentIndex

(PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.4.0)

ZipArchive::setCommentIndex - 设置由其索引定义的条目的注释

描述

代码语言:javascript
复制
bool ZipArchive::setCommentIndex ( int $index , string $comment )

设置由其索引定义的条目的评论。

参数

index

入口索引。

comment

评论的内容。

返回值

成功时返回TRUE或失败时返回FALSE

示例

Example #1 Open an archive and set a comment for an entry

代码语言:javascript
复制
<?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 →

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com