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

ZipArchive::getCommentName

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

ZipArchive::getCommentName - 使用条目名称返回条目的注释

描述

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

使用条目名称返回条目的注释。

参数

name

条目的名称

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->getCommentName('test/entry1.txt'));
}?else?{
????echo?'failed,?code:'?.?$res;
}
?>

← ZipArchive::getCommentIndex

ZipArchive::getExternalAttributesIndex →

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com