Created
February 2, 2021 10:22
-
-
Save nympheastudio/90800f1148f32d54bb230a404612d71e to your computer and use it in GitHub Desktop.
dézipper .zip en PHP
This file contains hidden or 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
$fichier_zip = 'fichier_zip.zip'; | |
$path = pathinfo(realpath($file), PATHINFO_DIRNAME); | |
$zip = new ZipArchive; | |
$res = $zip->open($fichier_zip); | |
if ($res === TRUE) { | |
$zip->extractTo($path); | |
$zip->close(); | |
} else { | |
echo "Erreur lors du dezippage ! "; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment