Re: PATH_TRANSLATED yields \\ instead of \
| From: | Andy Hoffman | Date: | Thu, 13 Jul 2000 18:42:54 +0000 |
| Subject: | Re: PATH_TRANSLATED yields \\ instead of \ | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-1066@lists.php.net to get a copy of this message | ||
"Asendorf, John" wrote:
> Has anyone else noticed that $PATH_TRANSLATED returns a path like this:
>
> C:\\wwwroot\\something\\something\\something.php
>
> where are all the slashes coming from?
The reason for double back-slashes relates back to unix-style strings
(escape sequences). When you have a string value that just has
"C:\somedir\newdir\subdir", you'll notice that embedded in this string (by
unix convention) is the special escape sequence \n for a newline. But
that's not what you wanted. what you wanted was a REAL backslash. Well,
you'll have to escape sequence that too. And the escaped version is \\
(double back-slash).
Does that make sense?
--
Andy Hoffman
Web Developer
Bristol-Myers Squibb
office: LVL G1.2607
email: andy.hoffman@bms.com
phone: 609-252-5788