I'm using php 5.3 and Apache 2.2 in Linux OS. The file download is not working. I have used below code. Please help! The same code was working in local pc while developed. The local pc was php 5.3, apach2.2 and windows 7.
header('Content-Description: File Transfer');
//Below line is replace by force-download because this was not working when downloaded from web server
//header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Disposition: attachment; filename='.$actualfilename); //fetched filename from database
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Length: ' . filesize($file));