I have a batch file (batch.bat
) with a simple echo.
`ECHO Hello world`
Then I use php to capture the output, But the output is not what I expected.
C:\wamp\www\postEnginInstruction>ECHO Hello world Hello world
Why do I not only get the Hello world
?
PHP
$output = shell_exec('batch.bat');
print_r($output);