win path to linux path

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mad_phpq
Forum Commoner
Posts: 85
Joined: Fri Apr 27, 2007 5:53 am

win path to linux path

Post 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!
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: win path to linux path

Post 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'.
(#10850)
mad_phpq
Forum Commoner
Posts: 85
Joined: Fri Apr 27, 2007 5:53 am

Re: win path to linux path

Post by mad_phpq »

sorry. How can i change a path string using php?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: win path to linux path

Post by RobertGonzalez »

Path separators are generally interchangable in PHP. What are you trying to do?
Post Reply