Social Icons

twitterfacebookgoogle pluslinkedinemail

Friday 11 October 2013

How to create Zip file in php

Hello Friends,

You want  create ZIP file in php using programming...

its possible using following.






<?php


$zip = new ZipArchive();
$filename = "./test112.zip";


if ($zip->open($filename, ZipArchive::CREATE)!==TRUE) {
   exit("cannot open <$filename>\n");
}
$zip->addFile("1.txt");
echo "status:" . $zip->status . "\n";
$zip->close();
?>

For more reference please visit this site.

http://www.php.net/manual/en/zip.examples.php


Thanks

Enjoy your self

No comments :

Post a Comment

 

Free Advertisement

Free Advertisement

Free Advertisement

Free Advertisement