PHP zip_entry_name()関数
完全な PHP Zip File リファレンスマニュアル
定義と用法
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 Zip File リファレンスマニュアル その他の拡張機能