All pastes #974414 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-04-06 19:44 UTC
rendered paste body
// function getting zip data
function getZipData($file, $fromPath){

$zipFile = $fromPath . basename($file);
$zip = zip_open($zipFile);


if ($zip)
  {
  while ($zip_entry = zip_read(fopen($zip, 'r')))
    {
    $images[]=zip_entry_name($zip_entry);
    }
  zip_close($zip);
  echo 'The file readed successfuly...!<br>';
  }
  

$zip = new ZipArchive;
if ($zip->open($file) === TRUE) {
    $zip->extractTo('../../temp/');
    $zip->close();
	echo 'The file extracting successfuly..!<br>';
  } else {
    echo 'Problem unzipping file...!<br>';
}
return $images;
}