PHP zip_entry_name() 함수
예시
ZIP 파일 아카이브를 열고 디렉토리 항목의 이름을 가져옵니다.
<?php
$zip = zip_open("test.zip");
if ($zip) {
while ($zip_entry = zip_read($zip)) {
// Get name
of directory entry
echo "Name: " . zip_entry_name($zip_entry) . "<br>";
}
zip_close($zip);
}
?>
코드 출력은 ZIP 아카이브의 내용에 따라 다릅니다.
Name: ziptest.txt
Name: htmlziptest.html
정의 및 사용
zip_entry_name() 함수는 ZIP 디렉토리 항목의 이름을 반환합니다.
통사론
zip_entry_name(zip_entry)
매개변수 값
Parameter | Description |
---|---|
zip_entry | Required. Specifies the zip directory entry returned by zip_read() |
기술적 세부 사항
반환 값: | 디렉토리 항목의 이름 |
---|---|
PHP 버전: | 4.1.0+ |
❮ PHP Zip 참조