$file_name = 'a fielename with spaces.txt'; header("Content-disposition: attachment; filename=\"".$file_name."\"");