downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ZipArchive::statName> <ZipArchive::setCommentName
Last updated: Fri, 30 Oct 2009

view this page in

ZipArchive::statIndex

(PHP 5 >= 5.2.0, PECL zip >= 1.1.0)

ZipArchive::statIndexGibt die Details eines via Index bestimmten Eintrags zurück

Beschreibung

mixed ZipArchive::statIndex ( int $index [, int $flags ] )

Die Funktion erhält Informationen über einen Eintrag, der mittels seines Index bestimmt wird.

Parameter-Liste

index

Index des Eintrags.

flags

ZIPARCHIVE::FL_UNCHANGED kann angewendet werden, um ohne Berücksichtigung eventueller Veränderungen Informationen über die originale Datei im Archiv zu erhalten.

Rückgabewerte

Gibt ein Array zurück, das die Eintragsdetails enthält. Im Fehlerfall wird FALSE zurückgegeben.

Beispiele

Beispiel #1 Die Statusinformation eines Eintrags ausgeben

<?php
$zip 
= new ZipArchive;
$res $zip->open('test.zip');
if (
$res === TRUE) {
    
print_r($zip->statIndex(3));
    
$zip->close();
} else {
    echo 
'Fehler, Code:' $res;
}
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

Array
(
    [name] => foobar/baz
    [index] => 3
    [crc] => 499465816
    [size] => 27
    [mtime] => 1123164748
    [comp_size] => 24
    [comp_method] => 8
)


add a note add a note User Contributed Notes
ZipArchive::statIndex
There are no user contributed notes for this page.

ZipArchive::statName> <ZipArchive::setCommentName
Last updated: Fri, 30 Oct 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites