zip_entry_read() 함수는 열린 zip 아카이브 파일에서 내용을 가져오는 데 사용됩니다.
구문
zip_entry_read(zip_entry, len)
매개변수
-
zip_entry - 우편번호 입력 리소스. 필수.
-
렌 - 바이트 단위의 길이. 기본값은 1024입니다.
반환
zip_entry_read() 함수 열려 있는 zip 아카이브 파일의 내용을 반환합니다. 실패 시 FALSE를 반환합니다.
예다음은 예입니다. zip 파일 "one.zip"에 다음 콘텐츠가 포함된 "detail.txt"와 같은 단일 파일만 있다고 가정해 보겠습니다.
Asia is a continent!
예를 들어 보겠습니다 -
예시
<?php
$zip_file = zip_open("one.zip");
if ($zip_file) {
while ($zip_entry = zip_read($zip)) {
if (zip_entry_open($zip_file, $zip_entry)) {
echo "Text in the file = <br/>";
echo "zip_entry_read($zip_entry)<br />";
zip_entry_close($zip_entry);
}
echo "</p>";
}
zip_close($zip_file);
}
?> 출력
Text in the file = Asia is a continent!