update : 2015.11.03
php.shukuma.com

검색:
 
 
Returns the Zip archive comment

ZipArchive::getArchiveComment

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

ZipArchive::getArchiveCommentReturns the Zip archive comment

설명

string ZipArchive::getArchiveComment ([ int $flags ] )

Returns the Zip archive comment.

인수

flags

If flags is set to ZipArchive::FL_UNCHANGED, the original unchanged comment is returned.

반환값

Returns the Zip archive comment실패 시 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;
}
?>