ZipArchive::getCommentName
(PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.4.0)
ZipArchive::getCommentName - 使用条目名称返回条目的注释
描述
string ZipArchive::getCommentName ( string $name [, int $flags ] )使用条目名称返回条目的注释。
参数
name
条目的名称
flags
如果标志设置为ZipArchive::FL_UNCHANGED,则返回原始不变的注释。
返回值
成功时返回评论或失败时返回FALSE。
示例
Example #1 Dump an entry comment
<?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 →
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

