Page 1 of 1

win path to linux path

Posted: Thu Feb 07, 2008 2:08 pm
by mad_phpq
Can someone tell me how to change a windows path to a linux path. just the \ to / is all i need.

Thanks!

Re: win path to linux path

Posted: Thu Feb 07, 2008 2:44 pm
by Christopher
And get rid of the drive letter (e.g. c:) if that is in the path. Absolute Unix paths look like '/home/foo/www/' while on Windows 'c:\Users\foo\www'.

Re: win path to linux path

Posted: Thu Feb 07, 2008 3:07 pm
by mad_phpq
sorry. How can i change a path string using php?

Re: win path to linux path

Posted: Thu Feb 07, 2008 3:28 pm
by RobertGonzalez
Path separators are generally interchangable in PHP. What are you trying to do?