If God answer your Prayer, He is increasing Your Faith, If He Delay He is Increasing Your Patience, and If He Doesn’t Answer It means something is better for you. Believe In God. Always…….
ini_set(’memory_limit’,'800M’); set_time_limit(36000); /** * @Module to Extract folder in one directory * @package general * @Author: Mr. Manoj M.Ninave **/ //create media/import directory in root dir $dir = $_SERVER['DOCUMENT_ROOT'].”/media/import”; $filename = $dir.”/ABC.zip”;//destination $zip_file = “http://www.yourssite.com/ABC.zip”;//source $contents = file_get_contents($zip_file); //echo $contents; $handle = fopen($filename, “w+”); fwrite($handle,$contents); fclose($handle); $zip = zip_open($filename); if ($zip) { while ($zip_entry = zip_read($zip)) { $zipEntry = zip_entry_name($zip_entry); $zipEntryFile = substr($zipEntry,strrpos($zipEntry,”/”)+1); $dirFile = $zipEntryFile;//unzipped directory $dirPath = $dir.”/”.$dirFile; $fp = fopen($dirPath, “w+”); if (!$fp) continue; if(zip_entry_open($zip,$zip_entry, “r”)) { $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); fwrite($fp,$buf); zip_entry_close($zip_entry); fclose($...
Comments
Post a Comment