Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: userc865b
Added: Oct 17, 2018 7:35 AM
Modified: Oct 17, 2018 7:35 AM
Views: 3
Tags: php
zipps file
  1. <?php
  2.        
  3. $zip = new ZipArchive();
  4. $filename = "test112.zip";
  5.  
  6. if ($zip->open($filename, ZipArchive::CREATE)!==TRUE) {
  7.     exit("cannot open <$filename>\n");
  8. }
  9.  
  10. $zip->addFile("fileToZip.csv");
  11. $zip->close();
  12. ?>