1. 程式人生 > >Nginx windows命令行全局操作

Nginx windows命令行全局操作

參數 nginx top windows task hid -c hidden ole

在PHP目錄創建 .bat 輸入一下代碼。

@echo off
if "%1"=="start" goto start
if "%1"=="stop" goto stop
goto error

:start
start RunHiddenConsole php-cgi.exe -b 127.0.0.1:9000 -c C:\PHP\php.ini
start RunHiddenConsole php-cgi.exe -b 127.0.0.1:9001 -c C:\PHP\php.ini
start RunHiddenConsole php-cgi.exe -b 127.0.0.1:9002 -c C:\PHP\php.ini
exit /B

:stop
taskkill /F /IM php-cgi.exe
exit /B

:error
echo phpd:無效參數: "%1 %2"
echo=
exit /B

RunHiddenConsole.exe文件到百度雲下載

https://pan.baidu.com/s/1LDy4M7abi5hWSZpoE2bB8A

提取碼:hbkg

Nginx windows命令行全局操作