// This will strip out any punctuation and spaces from filenames, replacing such characters with underscores
$filename = preg_replace("/[^a-zA-Z0-9s.]/", "_", $filename);
Regular expressions filename replace
Leave a Reply
You must be logged in to post a comment.