*Here is a simple example*
<?php
$zp = zip_open('file.zip');
while ($file = zip_read($zp)) {
echo zip_entry_name($file).PHP_EOL;
}
?>
The output will be something similar to:
myfile.txt
mydir/(PHP 4 >= 4.1.0, PHP 5 >= 5.2.0, PHP 7, PHP 8, PECL zip >= 1.0.0)
zip_read — Lee la siguiente entrada en un archivo ZIP
Esta función está OBSOLETA a partir de PHP 8.0.0. Depender de esta función está altamente desaconsejado.
zip_read() lee la siguiente entrada en un archivo ZIP.
Devuelve un recurso de entrada de directorio para usar más tarde con las
funciones zip_entry_..., o false si no hay más entradas
para leer, o un código de error si ocurre un error.
| Versión | Descripción |
|---|---|
| 8.0.0 | Esta función está obsoleta en favor de la API orientada a objetos, ver ZipArchive::statIndex(). |
*Here is a simple example*
<?php
$zp = zip_open('file.zip');
while ($file = zip_read($zp)) {
echo zip_entry_name($file).PHP_EOL;
}
?>
The output will be something similar to:
myfile.txt
mydir/Note: Only the first 65535 entries will be returned, even if your archive contains more entries. See https://bugs.php.net/bug.php?id=59118 for details.