我希望能够启动Wamp Server,并且在加载apache之后,mysql会自动打开chrome并使用本地服务器的URL。
所以一个人需要做的就是点击wamp服务器图标,我的本地网站会自动加载到浏览器中。
这可能吗?
我正在查看wampmanager.ini文件并在
下尝试一些行;WAMPSTARTUPACTIONSTART
Action: run; FileName: "D:/Programs/wamp/bin/php/php5.4.12/php-win.exe";Parameters: "refresh.php";WorkingDir: "D:/Programs/wamp/scripts"; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors
;WAMPSTARTUPACTIONEND
但我得到错误。
答案 0 :(得分:0)
好的,这是一个有趣的想法。
您遇到的问题是您不应该编辑wampmanager.ini
文件,因为每次启动WAMPManager时都会从wampmanager.tpl
重建,或者在wampmanager图标上执行right click -> refresh
,绿色W
图标。
因此请修改\wamp\wampmanager.tpl
将此部分更改为此原始状态(首先备份)
[StartupAction]
;WAMPSTARTUPACTIONSTART
Action: run; FileName: "${c_phpCli}";Parameters: "refresh.php";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors
;WAMPSTARTUPACTIONEND
到这个
[StartupAction]
;WAMPSTARTUPACTIONSTART
Action: run; FileName: "${c_phpCli}";Parameters: "refresh.php";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors
Action: run; FileName: "${c_navigator}"; Parameters: "http://localhost/phpmyadmin/"; Flags: ignoreerrors
;WAMPSTARTUPACTIONEND
将Parameters: "http://localhost/phpmyadmin/";
更改为您要自动加载的网站的网址。我只是用phpmyadmin作为例子。