I have a file on a server that I need to be able to download, the problem is that it has a #'s in the name... am I missing an obvious answer here? When I try to download (click link for downloading) i get "file not found"
file name is "telephone #'s" (without double quotes)
I am urlencoding before download to the dl script where i urldecode it
$_GET['f'] = urldecode($_GET['f']);
if (file_exists ($_GET['f'])) {
$file_name = str_replace(' ', '_', $_GET['f']); // turn spaces in file name to underscore for save
header('Content-type: application/force-download');
header('Content-Disposition: attachment; filename=' . "$file_name");
readfile($_GET['f']);
} else {
//bad bad bad
}