JMair Posted May 4, 2010 Share Posted May 4, 2010 I think this is a php syntax error I'm not doing correctly. Here is the exact path I'm making for individual users. It works for all so far unless the user has a N for the first name, like Nancy Bell. $path = "shared documents of\nbell\Four Agreements\\"; I'm guessing this is failing because it's seeing the \n as a function? I've made a work around, but now I'm wondering how I should be solving this problem if a folder name starts with a 'n'? Quote Link to comment https://forums.phpfreaks.com/topic/200676-dir-path-folders-with-names-starting-with-n-issue/ Share on other sites More sharing options...
Alex Posted May 4, 2010 Share Posted May 4, 2010 Escape \n with a backslash ( \ ). Quote Link to comment https://forums.phpfreaks.com/topic/200676-dir-path-folders-with-names-starting-with-n-issue/#findComment-1053061 Share on other sites More sharing options...
salathe Posted May 4, 2010 Share Posted May 4, 2010 Escape \n with a backslash ( \ ). Or use single quoted strings: see http://php.net/types.string Quote Link to comment https://forums.phpfreaks.com/topic/200676-dir-path-folders-with-names-starting-with-n-issue/#findComment-1053067 Share on other sites More sharing options...
Mchl Posted May 4, 2010 Share Posted May 4, 2010 Or use / Windows can handle it. Quote Link to comment https://forums.phpfreaks.com/topic/200676-dir-path-folders-with-names-starting-with-n-issue/#findComment-1053070 Share on other sites More sharing options...
JMair Posted May 4, 2010 Author Share Posted May 4, 2010 Thanks all. the single quotes didn't work however switching the slashes did. Thanks a ton! Quote Link to comment https://forums.phpfreaks.com/topic/200676-dir-path-folders-with-names-starting-with-n-issue/#findComment-1053075 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.