I found my php program works fine even when slash of the path specified is incorrect.
\cache/wordinfo\h\1\2/world
is it important to format slash and back slash the path string?
I found my php program works fine even when slash of the path specified is incorrect.
\cache/wordinfo\h\1\2/world
is it important to format slash and back slash the path string?
I dont know any exact problem it could cause, but it is surely a cleaner solution to use path separators of your OS file system. If nothing else, you can need your paths somewhere else in the future and it mainly depends on current interpreter how it will work out incorrect path separators. Browser for example is good, but unix bash will scream in agony :)
It is not really an answer to your exact question, but I realized this too. Whenever possible I use the constant DIRECTORY_SEPARATOR
which will set the correct seperator depending on the environment (Linux / Windows).
You will find some nice examples to combine paths in the manual.