Hi all
one of our employees has added files to our site with spaces rather than hyphens. This measn we are experiencing problems when people using mozilla try to download one of these files.
Is it possibe to produce a script which takes the value of the file name (which is stored in a database field) and places hyphens, '-' instead of a space and then updates with this new value?
thanks in advance
updating file names
Moderator: General Moderators
Yeah. Just grab the name from the database, use str_replace() to fix the spaces, then use PHP's rename() function to rename all the files. And then update the value in the database so that they're correct too.
And finally make sure whatever script you're using to upload files to your site doesn't let it happen again.
And finally make sure whatever script you're using to upload files to your site doesn't let it happen again.