homer.favenir Posted October 3, 2009 Share Posted October 3, 2009 hi, what is the difference between backslash and forward slash? //asecasiagsd/AGS/AGS/WIP/RECSCHART/WG0045901.WEB08.02.004.zip \\asecasiagsd\ags\ags\wip\recschart\WG0045901.WEB08.02.004.zip thanks Quote Link to comment https://forums.phpfreaks.com/topic/176347-backslash-vs-forward-slash/ Share on other sites More sharing options...
ngreenwood6 Posted October 3, 2009 Share Posted October 3, 2009 One goes backwards the other forwards lol. In all seriousness I am not sure what exactly you are asking. I assume your are trying to figure out what the difference in php is. Usually forward slashes are used like normal to show directories, urls, etc. Backslashes are used to escape characters and for certain functions, for example "\n" inserts a new line whereas "/n" will not and refers to a path. Quote Link to comment https://forums.phpfreaks.com/topic/176347-backslash-vs-forward-slash/#findComment-929458 Share on other sites More sharing options...
homer.favenir Posted October 3, 2009 Author Share Posted October 3, 2009 //asecasiagsd/AGS/AGS/WIP/RECSCHART/WG0045901.WEB08.02.004.zip \\\asecasiagsd\AGS\AGS\WIP\RECSCHART\WG0045901.WEB08.02.004.zip whats the difference? Quote Link to comment https://forums.phpfreaks.com/topic/176347-backslash-vs-forward-slash/#findComment-929472 Share on other sites More sharing options...
Zane Posted October 3, 2009 Share Posted October 3, 2009 \ normally used in things like \n, \g, \r, etc oh yeah...and comments.. like \\comment and \* comment *\ / Although if you are using fopen or file or any other file commands and you are using windows.. and you want to include a direct path using the drive letter you would then use the backslash. Quote Link to comment https://forums.phpfreaks.com/topic/176347-backslash-vs-forward-slash/#findComment-929477 Share on other sites More sharing options...
homer.favenir Posted October 3, 2009 Author Share Posted October 3, 2009 i know that backslash is an escape string, but the code im working is using \\\\\\asecasiagsd\\AGS\\AGS\\WIP\\RECSCHART\\WG0045901.WEB08.02.004.zip which outputs \\\asecasiagsd\AGS\AGS\WIP\RECSCHART\WG0045901.WEB08.02.004.zip Quote Link to comment https://forums.phpfreaks.com/topic/176347-backslash-vs-forward-slash/#findComment-929493 Share on other sites More sharing options...
redarrow Posted October 3, 2009 Share Posted October 3, 2009 \\\\\\asecasiagsd\\AGS\\AGS\\WIP\\RECSCHART\\WG0045901.WEB08.02.004.zip what are you using this command in exec() function? Quote Link to comment https://forums.phpfreaks.com/topic/176347-backslash-vs-forward-slash/#findComment-929497 Share on other sites More sharing options...
homer.favenir Posted October 3, 2009 Author Share Posted October 3, 2009 im using it for transferring file and downloading file Quote Link to comment https://forums.phpfreaks.com/topic/176347-backslash-vs-forward-slash/#findComment-929498 Share on other sites More sharing options...
trq Posted October 3, 2009 Share Posted October 3, 2009 i know that backslash is an escape string, but the code im working is using Its no different, the first backslash excaps the second etc etc. This would be need within a double quoted string. Quote Link to comment https://forums.phpfreaks.com/topic/176347-backslash-vs-forward-slash/#findComment-929505 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.