Wakefield's Daily Tips

Use foreslashes not backslashes in file paths

Windows file paths use backslashes (\) to separate the folders in the path.

This doesn’t work online because Linux-base servers use slashes (/) instead. Worse than that, the backslash character is used to mark the beginning of an “escape sequence” so the following character is interpreted by JavaScript as something else.

Here are some examples:
\n new line
\t tab
\' or \" Literal single or double quotes
\\ Literal \
\b backpace
\xHH character repesented by the hexadecimal number HH in ASCII (Windows-1252)

1 Like