Your problem arises when you escape the wrong characters.
The correct dir, when unescaped should be
Code:
Z:\mydirectory\htdocs
We need to escape both of the backslashes with a preceding backslash.
Your $dir 's are, as unescaped strings
Code:
Dir 1: Z:\mydirectory\\htdocs
Dir 2: Z:\\mydirectory\htdocs
Dir 3: Z://mydirectory/htdocs/
The problem with Dir 1 is that you forgot to escape the backslash before htdocs, so it escapes "\h" not the backslash, and since "\h" is not a special character, it becomes "\\h" (but you want it to be "\h")
The correct $dir would be
PHP Code:
$dir = "Z:\\mydirectory\\htdocs";
Bookmarks