$file_dir=$totalDirectory;
$file_name=$filename;
//echo ''./db/''.$file_dir.$file_name;
if (file_exists($file_dir.$file_name)){
$file=fopen($file_dir.$file_name,''r'');
Header(''Content-type:application/octet-stream'');
Header(''Accept-Ranges:bytes'');
Header(''Content-Disposition:attachment;filename=''.$file_name);
echo fread($file,filesize($file_dir.$file_name));
fclose($file);
exit;
}else{
echo ''file is not exists'';
}