Currently I use this code to download a zip file:
<?php
$weborder = $_POST['weborder'];
$printlocation = $_POST['print'];
$file = 'z:\Backup\\'.$printlocation.'\\'.$weborder.'.zip';
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
readfile($file);
exit;
}
else
{
echo ":(";
}
?>
The zip file contains 4 files. The problem that I am having right now is that 3 files shouldnt be downloaded. I was wondering if there is a simple way to select which files dont get downloaded.