Re: How to execute a bat file on the Apache server
| From: | Petre Agenbag | Date: | Tue, 22 Jul 2003 12:23:47 +0000 |
| Subject: | Re: How to execute a bat file on the Apache server | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156213@lists.php.net to get a copy of this message | ||
Well, firstly, you should not have to use the double \\ when using the
single quotes, try it without and see if it works...
ie,
<?php
> exec('c:\WINNT\system32\cmd.exe /c START c:\test.bat > c:\xxx.txt');
> ?>
On Mon, 2003-07-21 at 16:34, Mikael wrote:
> Hello all, I am trying to execute a bat file, and its not working. I manage
> to get the CMD in the "win task list" however its not executing the bat
> file, and its not closing it self...?? What I need it for is to execute a
> modem to send a SMS. I got that working but the php stuff is not really my
> bussiness...so please, I need some help.
>
> I have tried:
>
> <?php
> exec('c:\\WINNT\\system32\\cmd.exe /c START c:\\test.bat > c:\\xxx.txt');
> ?>
>
> Os:win 2000
>
> Can anyone sheed some light on this...?
>
> Thanks in advance
>
>