Answer the question
In order to leave comments, you need to log in
How to run php.exe from windows console?
No matter how I tried to write .bat, I can’t figure out how to run php even in a simple Windows console.
In Linux, everything is simple: I launch the terminal in the folder and write ./php -v
everything works. Windows is complete trash. Please tell me how to run php using .bat file
Answer the question
In order to leave comments, you need to log in
Apparently you have a broken php.
just downloaded and run:
alternatively try Bamcompile , it will turn your .php script into an executable .exe file
the path to php.exe must be added to the PATH
batch file:
@echo off
@setlocal
set SCRIPT_PATH=%~dp0
php.exe --f "%SCRIPT_PATH%script.php" %*
@endlocal
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question