在wamp服务器加载后打开带URL的浏览器

时间:2014-03-24 04:37:04

标签: wampserver

我希望能够启动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

但我得到错误。

1 个答案:

答案 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作为例子。

相关问题