Creating Zip Folders

http://flywind.com.br/bakester/4654 Here is the code to convert folders in zip folders and then download them

enter site

http://ostacamping.com/11-evenemang-blogg/53-berglundz File Name: zipfunction.php

Opinioni su live currency exchange rates pakistan gorizia. Lascia la tua opinione su trading team goriziae scopri opinioni su temi relazionati cometrading e team

watch class Zipfunction { /** * Add files and sub-directories in a folder to zip file. * @param string $folder * @param ZipArchive $zipFile * @param int $exclusiveLength Number of text to be exclusived from the file path. */ private static function folderToZip($folder, $zipFile, $exclusiveLength) { $handle = opendir($folder); while (false !== $f = readdir($handle)) { if ($f != '.' && $f != '..') { $filePath = "$folder/$f"; // Remove prefix from file path before add to zip. $localPath = substr($filePath, $exclusiveLength); if (is_file($filePath)) { $zipFile->addFile($filePath, $localPath); } elseif (is_dir($filePath)) { // Add sub-directory. $zipFile->addEmptyDir($localPath); self::folderToZip($filePath, $zipFile, $exclusiveLength); } } } closedir($handle); } /** * Zip a folder (include itself). * Usage: * HZip::zipDir('/path/to/sourceDir', '/path/to/out.zip'); * * @param string $sourcePath Path of directory to be zip. * @param string $outZipPath Path of output zip file. */ public static function zipDir($sourcePath, $outZipPath) { $pathInfo = pathInfo($sourcePath); $parentPath = $pathInfo['dirname']; $dirName = $pathInfo['basename']; $z = new ZipArchive(); $z->open($outZipPath, ZIPARCHIVE::CREATE); $z->addEmptyDir($dirName); self::folderToZip($sourcePath, $z, strlen("$parentPath/")); $z->close(); } }

https://www.tuseguro.com/kambjasie/2224 How to use this class?

http://getraenke-doeden.de/tyuie/3246

http://www.mentzer-consult.de/?afinoes=b%C3%BCcher-%C3%BCber-schulung-f%C3%BCr-bin%C3%A4re-optionen-und-traten&379=9f Calling the class for creating zip folder and downloading zip

here

frauen ab 30 treffen $sourcepath=getcwd().DIRECTORY_SEPARATOR.'facebook'; $destpath=$sourcepath.'.zip'; include_once 'zipfunction.php'; $zipfuncobj=new Zipfunction; $zipfuncobj->zipDir($sourcepath,$destpath); $downnloadfolderName='1.zip'; //give a name to zipped folder for downloading (name can be same as the zip folder name) header("Content-type: application/zip"); header("Content-Disposition: attachment; filename=$downnloadfolderName"); header("Pragma: no-cache"); header("Expires: 0"); readfile("$destpath"); //give here the zipped folder path to read for downloading exit;

go to site