PHP zip_entry_name() 函數(shù)
完整的 PHP Zip File 參考手冊
定義和用法
zip_entry_name() 函數(shù)返回 zip 檔案的名稱。
語法
zip_entry_name(zip_entry)
參數(shù) | 描述 |
zip_entry | 必需。規(guī)定要讀取的 zip 項目資源(由 zip_read() 打開的 zip 項目)。 |
實例
<?php
$zip = zip_open("test.zip");
if ($zip)
{
while ($zip_entry = zip_read($zip))
{
echo "Name: " . zip_entry_name($zip_entry) . "<br />";
}
zip_close($zip);
}
?>
上面的代碼將輸出:
Name: ziptest.txt
Name: htmlziptest.html
完整的 PHP Zip File 參考手冊