Working:
Code: Select all
if ($checkbox) {
$file = 'http://12.148.233.90/downloads/Tutorial1.wmv.zip';
// Set headers
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename=Tutorial1.wmv.zip");
header("Content-Type: application/zip");
header("Content-Transfer-Encoding: binary");
//header("Content-Length: " . filesize($file));
ob_clean();
flush();
readfile("$file");
exit;
}
else {
...
}Code: Select all
if ($checkbox) {
$file = '/downloads/Tutorial1.wmv.zip';
// Set headers
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename=Tutorial1.wmv.zip");
header("Content-Type: application/zip");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . filesize($file));
ob_clean();
flush();
readfile("$file");
exit;
}
else {
...
}If you need me to clarify anything, just ask. I could also map my HDD and upload my IIS settings too.