header("content-type: application/file"); 
header("content-disposition: attachment; filename=$filename");
readfile("$dir/$filename");