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