Last active
April 27, 2017 11:13
-
-
Save hyrious/204a97f5112d469459c0b44f5e5b66f7 to your computer and use it in GitHub Desktop.
php on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableDelayedExpansion | |
if "%*" == "" ( | |
echo Nothing todoy. ^(^^_^^^) | |
) else if "%*" == "list" ( | |
call tasklist /fi "ImageName eq php-cgi.exe" | |
) else if "%*" == "stop" ( | |
<nul set /p=Killing php-cgi.exe..^ | |
call taskkill /f /im php-cgi.exe >nul 2>&1 | |
echo Done. | |
) else if "%1" == "start" ( | |
goto kira | |
) else call php-cgi.exe %* | |
goto :EOF | |
:kira | |
<nul set /p=Starting php-cgi.exe..^ | |
set cmdline= | |
shift | |
:pp_loop | |
if "%1" == "" goto :pp_next | |
set cmdline=%cmdline% %~1 | |
shift | |
goto :pp_loop | |
:pp_next | |
start /b php-cgi.exe %cmdline% | |
echo Done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment