ZipArchive::getCommentIndex
(PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL zip >= 1.4.0)
ZipArchive::getCommentIndex — 항목 색인을 사용하여 항목의 주석을 반환합니다.
설명
public ZipArchive::getCommentIndex(int $index
, int $flags
= 0): string|false
항목 색인을 사용하여 항목의 주석을 반환합니다.
매개변수
index
- 항목의 색인
flags
- 플래그가
ZipArchive::FL_UNCHANGED
로 설정되면 변경되지 않은 원래 주석이 반환됩니다.
반환 값
성공 시 주석을 반환하고 실패 시 false
을 반환합니다.
Examples
예 #1 항목 주석 덤프
<?php
$zip = new ZipArchive;
$res = $zip->open('test1.zip');
if ($res === TRUE) {
var_dump($zip->getCommentIndex(1));
} else {
echo 'failed, code:' . $res;
}
?>