Skip to content

Instantly share code, notes, and snippets.

View vishal-yad14's full-sized avatar

Vishal Yadav vishal-yad14

View GitHub Profile
@vishal-yad14
vishal-yad14 / example1.php
Created August 15, 2012 11:13 — forked from ninetwentyfour/example1.php
Use PHP To Zip Folders For Download - blogpost
<?php
//Get the directory to zip
$filename_no_ext= $_GET['directtozip'];
// we deliver a zip file
header("Content-Type: archive/zip");
// filename for the browser to save the zip file
header("Content-Disposition: attachment; filename=$filename_no_ext".".zip");
@vishal-yad14
vishal-yad14 / example1.php
Created August 15, 2012 10:42 — forked from ninetwentyfour/example1.php
Use PHP To Zip Folders For Download - blogpost
<?php
//Get the directory to zip
$filename_no_ext= $_GET['directtozip'];
// we deliver a zip file
header("Content-Type: archive/zip");
// filename for the browser to save the zip file
header("Content-Disposition: attachment; filename=$filename_no_ext".".zip");