W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗(yàn)值獎勵
(PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL zip >= 1.1.0)
ZipArchive::statIndex — 獲取由其索引定義的條目的詳細(xì)信息
public ZipArchive::statIndex(int $index, int $flags = 0): array|false
該函數(shù)獲取有關(guān)其定義的條目的信息 指數(shù)。
index
條目的索引
flags
ZipArchive::FL_UNCHANGED
可以 OR 到它請求 有關(guān)存檔中原始文件的信息, 忽略所做的任何更改。
返回一個(gè)包含條目詳細(xì)信息的數(shù)組,或者在失敗時(shí)返回 false。
示例 #1 轉(zhuǎn)儲條目的統(tǒng)計(jì)信息
<?php
$zip = new ZipArchive;
$res = $zip->open('test.zip');
if ($res === TRUE) {
print_r($zip->statIndex(3));
$zip->close();
} else {
echo 'failed, code:' . $res;
}
?>
以上示例的輸出類似于:
Array ( [name] => foobar/baz [index] => 3 [crc] => 499465816 [size] => 27 [mtime] => 1123164748 [comp_size] => 24 [comp_method] => 8 )
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: