PHP+NGINX+WIN batch script

巴扎黑
Release: 2016-11-11 09:53:29
Original
1029 people have browsed it


@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
Copy after login

Regarding path configuration, environment variable configuration can be done in advance, or you can add environment variable setting path configuration language to this basic line


Related labels:
win
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!