Re: exec



Ryan Garnier wrote:

> Hi!
>
> Anyone know why this doesn't work?
>
> $ruta = "cmd /c \"C:\Server\Apache2\htdocs\webvcr\config\bat\a.bat\"";
> exec($ruta);
>
>
> Thanks in advance!

You must escape all the "\" signs in the path as well, like this:

$ruta = "cmd /c
\"C:\\Server\\Apache2\\htdocs\\webvcr\\config\\bat\\a.bat\"";
exec($ruta);

--
Kim André Akerø
- kimandre@xxxxxxxxxxxxxxxxxx
(remove NOSPAM to contact me directly)
.



Relevant Pages