This may be stating the obvious but I assume that mtime is "millisecond time". Using http://www.onlineconversion.com/unix_time.htm the example time "1123164748" converts to "Thu, 04 Aug 2005 14:12:28 GMT".
The two sizes - size and comp_size are presumably in bytes (the latter being the compressed file in the archive).
ZipArchive::statName
(PHP 5 >= 5.2.0, PECL zip >= 1.5.0)
ZipArchive::statName — 名前を使用してエントリの詳細を取得する
パラメータ
- name
-
エントリの名前。
- flags
-
名前をどのように探すのかを設定します。 また ZIPARCHIVE::FL_UNCHANGED を OR で連結すると、 アーカイブ内に最初に記録された際の情報を取得します。 変更内容は無視されます。
-
ZIPARCHIVE::FL_NOCASE
-
ZIPARCHIVE::FL_NODIR
-
ZIPARCHIVE::FL_UNCHANGED
-
返り値
エントリの詳細を含む配列、あるいは失敗した場合に FALSE を返します。
例
例1 エントリの情報の出力
<?php
$zip = new ZipArchive;
$res = $zip->open('test.zip');
if ($res === TRUE) {
print_r($zip->statName('foobar/baz'));
$zip->close();
} else {
echo '失敗、コード:' . $res;
}
?>
上の例の出力は、 たとえば以下のようになります。
Array
(
[name] => foobar/baz
[index] => 3
[crc] => 499465816
[size] => 27
[mtime] => 1123164748
[comp_size] => 24
[comp_method] => 8
)
ZipArchive::statName
martin_packer at uk dot ibm dot com
23-Oct-2009 03:43
23-Oct-2009 03:43
