glenelkins Posted January 6, 2008 Share Posted January 6, 2008 Hi Does addslashes() work with filenames as well as mysql information? As a current project requires folders to be created from input that will contain special ( file system illegal )chars cheers Link to comment https://forums.phpfreaks.com/topic/84771-addslashes-and-filenames/ Share on other sites More sharing options...
trq Posted January 6, 2008 Share Posted January 6, 2008 From the manual: Returns a string with backslashes before characters that need to be quoted in database queries etc. These characters are single quote ('), double quote ("), backslash (\) and NUL (the NULL byte). Link to comment https://forums.phpfreaks.com/topic/84771-addslashes-and-filenames/#findComment-432059 Share on other sites More sharing options...
glenelkins Posted January 6, 2008 Author Share Posted January 6, 2008 yeh i know that, but do escape chars work with filenames? Link to comment https://forums.phpfreaks.com/topic/84771-addslashes-and-filenames/#findComment-432103 Share on other sites More sharing options...
redarrow Posted January 6, 2008 Share Posted January 6, 2008 what for give us an example? Link to comment https://forums.phpfreaks.com/topic/84771-addslashes-and-filenames/#findComment-432111 Share on other sites More sharing options...
GingerRobot Posted January 6, 2008 Share Posted January 6, 2008 No. A backslash is only an escape character in mysql etc. It wont work with special characters in the filename. Apart from anything else, the backslash IS a character which is not allowed in a filename. Link to comment https://forums.phpfreaks.com/topic/84771-addslashes-and-filenames/#findComment-432118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.