I\'m looking for a php function that will sanitize a string and make it ready to use for a filename. Anyone know of a handy one?
( I could write one, but I\'m worri
one way
$bad='/[\/:*?"<>|]/'; $string = 'fi?le*'; function sanitize($str,$pat) { return preg_replace($pat,"",$str); } echo sanitize($string,$bad);