I\'m trying to force download files from my web server using PHP. I\'m not a pro in PHP but I just can\'t seem to get around the problem of files downloading in 0 bytes in s
i am doing this to download a PDF ...
$filename = 'Application.pdf';
header("Content-Type: application/pdf");
header("Content-Disposition: attachment; filename=$filename");
echo $pdf;
i think you are missing the last row, where you actually send the file contents of whatever you have in $file.
Pablo