note 54232 modified in ref.zip by danbrown

From: Date: Sun, 25 Oct 2009 13:13:15 +0000
Subject: note 54232 modified in ref.zip by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162063@lists.php.net to get a copy of this message
If you just want to unzip a zip folder an alternative to some of the lengthy functions below is: <?php function unzip($zip_file, $src_dir, $extract_dir) { copy($src_dir . "/" . $zip_file, $extract_dir . "/" . $zip_file); chdir($extract_dir); shell_exec("unzip $zip_file"); } ?> You don't need the ZIP extension for this. --was-- If you just want to unzip a zip folder an alternative to some of the lengthy functions below is: <? function unzip($zip_file, $src_dir, $extract_dir) { copy($src_dir . "/" . $zip_file, $extract_dir . "/" . $zip_file); chdir($extract_dir); shell_exec("unzip $zip_file"); } ?> You don't need the ZIP extension for this. http://php.net/manual/en/ref.zip.php

« previous php.notes (#162063) next »