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

ZipArchive::getArchiveComment

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

ZipArchive::getArchiveComment - 返回Zip归档注释

描述

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

返回Zip归档注释。

参数

flags

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

返回值

返回Zip归档注释或失败时返回FALSE

示例

Example #1 Dump an archive comment

代码语言:javascript
复制
<?php
$zip?=?new?ZipArchive;
$res?=?$zip->open('test_with_comment.zip');
if?($res?===?TRUE)?{
????var_dump($zip->getArchiveComment());
????/*?Or?using?the?archive?property?*/
????var_dump($zip->comment);
}?else?{
????echo?'failed,?code:'?.?$res;
}
?>

← ZipArchive::extractTo

ZipArchive::getCommentIndex →

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com