I have a case that i need to exit the batch (.bat) program while executing a php script inside.
for example, this is my php code echo.php
<?php echo "NOTHING TO DO" ?>
and then i create a batch file to run it, this is just an example of my logic, but this is not work
@title "ECHO TEST"
@echo off
D:
cd D:\xampp\htdocs
SET status = "D:\xampp\htdocs\echo.php"
echo Status is %status%
pause
expected output is
Status is NOTHING TO DO
the final is i just need to know how to put php cli output into a variable of batch file so i can do condition for it.