tallberg Posted July 29, 2009 Share Posted July 29, 2009 Hi Im using the spaw editor and when my client uploads a file with an apostrophe in the file name it adds a backslash then the files are no longer visible in the editor. If found this solution in another forum which doesnt work replace - > $uplfile_name = ereg_replace('(.*)(\.[a-zA-Z]+)$', '\1_'.$i.'\2', $uplfile['name']); with -> $uplfile_name = ereg_replace('(.*)(\.[a-zA-Z]+)$', '\1_'.$i.'\2', preg_replace('/[^a-z0-9_\-\.]/i', '_', $uplfile_name)); Ive tryed $uplfile_name =str_replace("\'","_", $uplfile_name ); which work locally but not on the server. I wondering if this is related to a php configuration? Any thought? Link to comment https://forums.phpfreaks.com/topic/167983-file-names-in-the-uploader-are-add-corrupted/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.