PHP zip_entry_name() 函數
PHP zip_entry_name() 函數

定義和用法
zip_entry_name() 函數返回 zip 檔案的名稱。
語法
zip_entry_name(zip_entry)
參數 | 描述 |
---|---|
zip_entry | 必需。規定要讀取的 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);
}
?>
$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
Name: htmlziptest.html

相關文章
- PHP 運算符
- PHP Cookie
- PHP 過濾器
- PHP array_diff() 函數
- PHP array_fill_keys() 函數
- PHP array_intersect_uassoc() 函數
- PHP array_reduce() 函數
- PHP array_reverse() 函數
- PHP array_search() 函數
- PHP array_udiff_uassoc() 函數
- PHP array_uintersect() 函數
- PHP array_unshift() 函數
- PHP compact() 函數
- PHP key() 函數
- PHP natsort() 函數
- PHP sort() 函數
- PHP uasort() 函數
- PHP Libxml 函數
- PHP Mail 函數
- PHP 5 MySQLi 函數