Windows 小皮 phpstudy 命令行安装与配置
配置文件:
“开机自启选项”配置文件:C:\phpstudy_pro/COM/xp.ini
[General]
Apache2.4.39=D:/phpstudy_pro/Extensions/Apache2.4.39/bin/httpd.exe|
开关控制:
开机自启(启用/停用):显示名称:phpstudy服务。服务名称:phpStudySrv
注:猜测:此服务的功能:启动ini配置文件内的服务,只启动时执行一次
注:面板开启两次,此服务被停止,期间面板显示“开机自启”状态不正常。
# 注:修改后重启面板才会更新显示值
# 启用“开机自启”,将服务改为自动
sc config phpStudySrv start= auto
# 关闭“开机自启”,将服务改为手动
sc config phpStudySrv start= demand
apache、mysql等(启动/停止)
启动所有服务(开机配置文件xp.ini内的服务)
powershell -c "Restart-Service -Name phpStudySrv"
# 注:当面板开启时,会自动将已关闭服务再次开其。
# 关闭apache
wmic process where caption='httpd.exe' delete
# 关闭mysql
wmic process where caption='mysqld.exe' delete
退出小皮面板界面
注:鼠标退出界面时,此两个进程都会关闭
# 注:猜测:显示界面,守护服务启动状态,已启动服务中断时通知"phpStudyServer.exe"再次开启,启动失败则终止扫描并显示状态。
# 关闭phpStudyServer.exe再手动启动phpStudyServer.exe -install,界面的守护失效,点击“启动”后会再次生效,手动启动的phpStudyServer.exe能正常配合
wmic process where caption="phpstudy_pro.exe" delete
# 注:猜测:接受"phpstudy_pro.exe"面板的服务控制并操作服务(启动,停止等)。
wmic process where (commandline like "%phpStudyServer.exe -install") delete
注意事项:
- UI界面第一次启动会直接覆盖:%phpstudy_pro%\Extensions\Apache2.4.39\conf\vhosts\0localhost_80.conf