With Apache + PHP
This code allows us to download a file zip from browser:
<?php $your_zip_file = "/path/to/your_zip_file.zip"; $file_name = basename($yourfile); header("Content-Type: application/zip"); header("Content-Disposition: attachment; filename=$file_name"); header("Content-Length: " . filesize($your_zip_file )); readfile($your_zip_file ); exit; ?>
Advertisements
This is a good solution for us when we don’t wannar open in another page. Good job!!!
Thank you Keith !
Magnificent website. Lots of useful info here. I’m sending it to several pals ans additionally sharing in delicious. And certainly, thanks for your sweat!
Thank you 🙂