Syntax for Windows \\
Posted by: ibi001 (---.chicago.hfc.comcastbusiness.net)
Date: December 13, 2006 04:10PM

When we enter the comands for windows do we use one or two \\ slashes...
e:\\wamp\\www or
e:\wamp\www

I have seen some command lines with two slashes....

$dir['root'] = "e:\\wamp\\www\\date\\";

and why the two slashes, why not just one????????

Options: ReplyQuote
Re: Syntax for Windows \\
Posted by: Mark Jones (---.buckeyecom.net)
Date: December 14, 2006 07:29PM

Hi ibi. PHP syntax does not allow the \ character in strings singly because it is considered an escape character. To make a literal \ character in a string, you need to put two of them. See the PHP documentation for more info.

Options: ReplyQuote
Re: Syntax for Windows \\
Posted by: ibi001 (---.chicago.hfc.comcastbusiness.net)
Date: December 15, 2006 06:57PM

thanks for your comment.. in the wamp httpd.conf..... for windows os....
do we put the slashes forward or backward ...
directoryRoot "e:\xxxx\yyyyy"

linux is alway //////// and windows is \\\\\\\...
but does wamp always use the //// for it's syntax????
confused.... we should have one standard for win andlinux....

Options: ReplyQuote


Sorry, only registered users may post in this forum.