upload script filename checking
| From: | Michael Knauf/Niles | Date: | Mon, 14 Oct 2002 13:41:24 +0000 |
| Subject: | upload script filename checking | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22373@lists.php.net to get a copy of this message | ||
Ok, so I've got a simple upload script... User uses form to select a file,
the file is then uploaded to a dir on the web server, and a link is
provided for the user to view the file.
Of course when the user uploads "my pic.jpg" the resulting link is broken
(because of the space)... so I want to replace any occurrence of " " with "
_"
Now I'm sure there are other nastys to worry about but I'm new to this any
suggestions on an easy way to make sure the file names are good?
Michael