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

ZipArchive::getCommentIndex

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

ZipArchive::getCommentIndex - 使用条目索引返回条目的评论

描述

代码语言:javascript
复制
string ZipArchive::getCommentIndex ( int $index [, int $flags ] )

使用条目索引返回条目的评论。

参数

index

入口索引

flags

如果标志设置为ZipArchive::FL_UNCHANGED,则返回原始不变的注释。

返回值

成功时返回评论或失败时返回FALSE

示例

Example #1 Dump an entry comment

代码语言:javascript
复制
<?php
$zip = new ZipArchive;
$res = $zip->open('test1.zip');
if ($res === TRUE) {
    var_dump($zip->getCommentIndex(1));
} else {
    echo 'failed, code:' . $res;
}
?>

← ZipArchive::getArchiveComment

ZipArchive::getCommentName →

扫码关注腾讯云开发者

领取腾讯云代金券