直接上代码,文件在底部,下载后修改PHP目录后运行php-cgi.bat即可
1 @echo off
2 :main
3 set jinchengshuliang=0
4 set jinchengshuliangxiaxian=2
5
6 for /f %%i in ('tasklist ^|findstr /i /s /c:"php-cgi.exe"') do set /a jinchengshuliang+=1
7
8 if %jinchengshuliang% lss %jinchengshuliangxiaxian% (
9 goto youwenti
10 ) else (
11 goto meiwenti
12 )
13
14 :youwenti
15 echo 进程丢失,现在添加4个进程
16 RunHiddenConsole.exe D:\data\php\php-cgi.exe -b 127.0.0.1:5609 -c D:\data\php\php.ini
17 RunHiddenConsole.exe D:\data\php\php-cgi.exe -b 127.0.0.1:5609 -c D:\data\php\php.ini
18 RunHiddenConsole.exe D:\data\php\php-cgi.exe -b 127.0.0.1:5609 -c D:\data\php\php.ini
19 RunHiddenConsole.exe D:\data\php\php-cgi.exe -b 127.0.0.1:5609 -c D:\data\php\php.ini
20 goto main
21
22 :meiwenti
23 echo 正常运行中!
24 goto main
百度网盘链接: https://pan.baidu.com/s/1boN5xGN 密码: 55ns
|