Re: There must be a better way (to clean a filename)
| From: | Verdon Vaillancourt | Date: | Sun, 11 May 2003 14:07:31 +0000 |
| Subject: | Re: There must be a better way (to clean a filename) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147203@lists.php.net to get a copy of this message | ||
On 5/11/03 7:09 AM, "php-general-digest-help@lists.php.net"
Richard Lynch wrote:
> Rule #1.
>
> Instead of trying to think of ALL the things a user could do to be
> stupid with a filename, define what is a VALID name, and throw out
> everything else....
Excellent answer, thank you :)
> Of course, there *IS* a built-in PHP function to do something like this,
> but I always forget what it is called, and there are characters it
> allows I dis-like or vice versa... Dig into the manual and find it,
> rather than hacking your own, if you can live with the PHP rules...
I thought there should be, but after spending some time digging I just
seemed to be going in circles. I like the looks of the tips you provided and
am sure I will learn much digging through it.
> PS Any relation to the musician Dan Vaillancourt playing at Uncomon
> Ground http://uncommonground.com shortly? I'm the guy who
> booked him
> :-)
I'll reply to this off-list
Thanks again :)
Verdon