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 Quote 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). Quote 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? Quote 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? Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/84771-addslashes-and-filenames/#findComment-432118 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.