str_replace before saving to folder
hi,
I want to take spaces out of my filenames. This works with a str_replace but i noticed that it was only replacing ' ' with '_' for the names in the DB.
I figured out that the str_replace was changing the name after the file had been saved to the server, but before the filename was inserted to the DB.
How can i replace the spaces in a filename with _ before the picture is saved in my images folder on the server?