Rumah >pembangunan bahagian belakang >tutorial php >PHP+NGINX+WIN 批处理脚本
@ECHO OFF COLOR 0A TITLE Nginx PHP 启动 TASKLIST|FINDSTR nginx.exe && TASKKILL /F /IM nginx.exe TASKLIST|FINDSTR php-cgi.exe && TASKKILL /F /IM php-cgi.exe GOTO startnginx :startnginx ECHO. ECHO.Start Nginx D: CD D:\Program Files\nginx-1.8.0\ start nginx ECHO.StartNginxOK GOTO startphpcgi :startphpcgi ECHO. ECHO.启动php-cgi...... D: CD D:\Program Files\php-5.6.8-Win32-VC11-x64\ IF NOT EXIST %PHP_CGI% ECHO %PHP_CGI%不存在 ECHO set wscriptObj = CreateObject("Wscript.Shell") >start_fastcgi.vbs ECHO wscriptObj.run "php-cgi.exe -b 127.0.0.1:9001 -c D:\Program Files\php-5.6.8-Win32-VC11-x64\php.ini",0 >>start_fastcgi.vbs start_fastcgi.vbs del start_fastcgi.vbs ECHO.StartPhpcgiOK PING 127.0.0.1 > nul EXIT
关于路径配置,和环境变量配置可以提前做,也可以在这个基础行加上 环境变量设置 路径配置语言