เพื่ออ่านไฟล์เดี่ยวภายใน zip archive โค้ดมีดังนี้:
$handle = fopen('zip://test.zip#test.txt', 'r'); $result = ''; while (!feof($handle)) { $result .= fread($handle, 8192); } fclose($handle); echo $result;ผลลัพธ์จะเป็นเนื้อหาของไฟล์ zip
เพื่ออ่านไฟล์เดี่ยวภายใน zip archive โค้ดมีดังนี้:
$handle = fopen('zip://test.zip#test.txt', 'r'); $result = ''; while (!feof($handle)) { $result .= fread($handle, 8192); } fclose($handle); echo $result;ผลลัพธ์จะเป็นเนื้อหาของไฟล์ zip