【问题标题】:Open browser with URL after wamp server loadswamp 服务器加载后使用 URL 打开浏览器
【发布时间】:2014-03-24 04:37:04
【问题描述】:

我希望能够启动 Wamp Server,并在它加载 apache 和 mysql 后自动打开带有本地服务器 url 的 chrome。

所以基本上一个人需要做的就是点击 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

但我得到了错误。

【问题讨论】:

    标签: wampserver


    【解决方案1】:

    好的,这是一个有趣的想法。

    您遇到的问题是您不应该编辑 wampmanager.ini 文件,因为每次启动 WAMPManager 或在 wampmanager 图标(绿色 W 图标)上执行 right click -> refresh 时,它都会从 wampmanager.tpl 重建.

    所以编辑\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为例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-02-04
      • 1970-01-01
      • 2017-02-05
      • 2017-07-14
      • 2020-05-27
      • 2018-12-20
      • 1970-01-01
      相关资源
      最近更新 更多