I have a batch file that calls a php script. The php script returns a value that I want to use in the batch script. The php script echoes the correct return value however I have not been able to find a way to capture the value to use in the batch file.
I have tried a number of variations on for loops without success. My batch script is as follows:
@echo off
Setlocal
"C:\Program Files (x86)\PHP\v5.3\php.exe" -f C:\inetpub\wwwroot\hello.php
endlocal
This of course just returns "Hello." How can I set a variable in the batch file (a variable named retVar for example) to contain what is returned from this php call?
thank you, Shimon