marc6678 Posted February 13, 2013 Share Posted February 13, 2013 Hi guys, I am trying to join this text ..\ and the variable $filepath. Both are text but whatever I do there is an error thrown. Its so that I can go back a directory when using the file path stored in the variable $filepath. Thanks, Marc Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 13, 2013 Share Posted February 13, 2013 You probably want / Regardless we need to see your code. Quote Link to comment Share on other sites More sharing options...
marc6678 Posted February 13, 2013 Author Share Posted February 13, 2013 This is the code I currently have, for some reason the board wont let me enter a new line but hey... echo "..\$parturl"; its to go back a directory and into the folder media/images/gallery so $parturl stores that plus the exact file name so I need to add ..\ to the front of media/images/gallery/img1.png for example which is gathered from a field in a database Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 13, 2013 Share Posted February 13, 2013 The \ is trying to escape the $ You want the other slash, regardless. See all your other slashes go that way?? Quote Link to comment Share on other sites More sharing options...
marc6678 Posted February 13, 2013 Author Share Posted February 13, 2013 The \ is trying to escape the $ You want the other slash, regardless. See all your other slashes go that way?? Hi yes, I see that however I thought for going backward the backslash was needed? Quote Link to comment Share on other sites More sharing options...
DavidAM Posted February 14, 2013 Share Posted February 14, 2013 Since M? W?????? is the only operating system that uses the backslash, I guess that says it all! Quote Link to comment Share on other sites More sharing options...
Barand Posted February 14, 2013 Share Posted February 14, 2013 I guess it's a throwback to its CP/M ancestry. Quote Link to comment 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.