PHP: How to sanitize uploaded filenames?

XOXO

New Member
I have a PHP application.I allow users to upload files to my web application.Question: What's the best way for me to sanitize the file names of the uploaded documents \[code\]$_FILES["filename"]["tmp_name"]\[/code\] in PHP?UPDATE:Can I take an MD5 of the uploaded filename and use that as the newly assigned filename? If so, how do I do that in PHP?
 
Back
Top