Re: Got a makestringsafe_for_filename() function?
| From: | Rory Browne | Date: | Wed, 22 Jun 2005 19:35:11 +0000 |
| Subject: | Re: Got a makestringsafe_for_filename() function? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-217436@lists.php.net to get a copy of this message | ||
I'm sure you could do something with
preg_replace("#[^a-zA-Z0-9_]#", "", $input);
On 6/22/05, René Fournier <m5@renefournier.com> wrote:
> I imagine some of you have written a nice little function for taking an
> arbitrary user-input string, and sanitizing and cleaning it for us as a
> UNIX (Mac OSX) filename...
>
> Would you mind sharing it? Thanks.
>
> ....René
>
> ---
> René Fournier
> www.renefournier.com
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>