-
-
Save parzibyte/3eaedda3ab75fea97ac56c34b36ee400 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Extraer un zip con PHP | |
* Ejemplo 1 | |
* | |
* @author parzibyte | |
* Más tutoriales en: parzibyte.me/blog | |
*/ | |
$zip = new ZipArchive; | |
$rutaArchivo = __DIR__ . "/documentos.zip"; | |
$directorioSalida = __DIR__ . "/documentos"; | |
if (!$zip->open($rutaArchivo)) { | |
exit("No se puede abrir el archivo $rutaArchivo"); | |
} | |
$zip->extractTo($directorioSalida); | |
$zip->close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment