Encontré este script para forzar la bajada de archivos.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
$filename = $_GET['file']; //Get the fileid from the URL header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Disposition: attachment; filename=".basename($VAR['FileName']).";"); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($VAR['FileName'])); @readfile($VAR['FileName']); exit(0); }else{ header("Location: /"); exit; } ?> files.php Download |