Here is my push.bat file
echo "Hello world!"
cd abhishek3/
call git add .
call git commit -m "sadf"
call heroku accounts:set abhishek84
call git push heroku master
I am able to push to my repository by running push.bat file in cmd
I want to push to my repo from php, tried following snippets but none of them worked for me.
exec("psexec -d push.bat");
Result: PHP page loads indefinitely
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("cmd /C abhishek3.bat, 0, false);
Result: Page stops loading after a while and nothing works
exec("cmd.exe /c abhishek3.bat")
Result: Page stops loading after a while and nothing works
EDIT: Tried the following snippet but nothing worked.
exec("hstart.exe /NOCONSOLE \"cmd.exe /c \"abhishek3.bat\"\"");
The above snippet runs successfully when run from cmd but when run from php through exec() didn't worked. Download hstart (Hidden Start Binary)