I have a basic script that allows my site members to upload short samples of their compositions for customers to listen to.
Some file names have spaces which obvi
$filename = str_replace(' ', '-', trim(addslashes($_FILES['userfile']['name'])));
Why addslashes though? This also seems a little too simple -- am I missing something?
addslashes