[PHP-DB] upload script filename checking

2002-10-14 Thread Michael Knauf/Niles


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



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] upload script filename checking

2002-10-14 Thread Bas Jobsen

Op maandag 14 oktober 2002 15:41, schreef Michael Knauf/Niles:
 (because of the space)... so I want to replace any occurrence of   with 
 _
$filename=str_replace(' ','_',$filename);

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php