ZipArchive::getArchiveComment

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

ZipArchive::getArchiveComment — Zip 아카이브 주석을 반환합니다.


설명

public ZipArchive::getArchiveComment(int $flags = 0): string|false

Zip 아카이브 주석을 반환합니다.


매개변수

flags
플래그가 ZipArchive::FL_UNCHANGED로 설정되면 변경되지 않은 원래 주석이 반환됩니다.

반환 값

Zip 아카이브 주석을 반환하거나 실패 시 false를 반환합니다.


Examples

예 #1 아카이브 주석 덤프

                  
<?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;
}
?>