I\'m making a SWF uploader and have my HTML form done.
It works totally fine until I upload a SWF file with spaces in the name.
How can I replace whitespace
I usually approach it from the other side and only allow characters from a white-list; I replace everything except these characters:
$file = preg_replace("/[^-_a-z0-9]+/i", "_", $file);