不要配置环境,就可以运行网站的脚本boot.bat(无论哪种访问都需要下载php版本)
1. 两个适用于文件里有php版本文件
1 @echo off 2 title Skylar development tool 3 set ip=0.0.0.0 4 set local_ip=127.0.0.1 5 set port=10000 6 :start 7 set /a port+=1 8 if %port% geq 20000 (goto end) 9 netstat -ano|findstr %ip%:%port%>nul 10 if ERRORLEVEL 1 (goto run) else (goto start) 11 :run 12 start http://%local_ip%:%port% 13 php.exe think run --port=%port% 14 :end 15 echo No ports available 16 pause
1 @echo off 2 title Skylar development tool 3 set ip=0.0.0.0 4 set port=10000 5 :start 6 set /a port+=1 7 if %port% geq 20000 (goto end) 8 netstat -ano|findstr %ip%:%port%>nul 9 if ERRORLEVEL 1 (goto run) else (goto start) 10 :run 11 start http://127.0.0.1:%port% 12 php think run --port=%port% 13 :end 14 echo No ports available 15 pause
2.适用于指定php版本访问
1 @echo off 2 title Skylar development tool 3 set ip=0.0.0.0 4 set local_ip=127.0.0.1 5 set port=10000 6 :start 7 set /a port+=1 8 if %port% geq 11102 (goto end) 9 netstat -ano|findstr %ip%:%port%>nul 10 if ERRORLEVEL 1 (goto run) else (goto start) 11 :run 12 cd .\public\ 13 start http://%local_ip%:%port% 14 D:\appserv\php\php73\php.exe -S %ip%:%port% 15 :end 16 echo No ports available 17 pause
作者:糖粿
来源:博客园
转载请注明原文链接:https://www.cnblogs.com/silen0119/p/16139301.html
声援博主: 如果您觉得文章对您有帮助,可以点击文章右下角【推荐】一下。