如何更改默认的“www 目录"用于 wampserver [英] How to change the default "www directory" for wampserver

查看:32
本文介绍了如何更改默认的“www 目录"用于 wampserver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我所有的网站都位于 D:/Documents/websites 目录中.我已经设法根据这个 视频教程.

All my websites are located in D:/Documents/websites directory. I already managed to point http://localhost/ to that folder based on this video tutorial.

但我还想要的是,每当我从 wampserver 面板单击www 目录"时,它都会打开 D:/Documents/websites 目录而不是 C:/wamp/www 这是默认的.

But what I also want is whenever I click on "www directory" from the wampserver panel it opens up D:/Documents/websites directory instead of C:/wamp/www which is the default one.

我如何做到这一点?谢谢.

How do I achieve that? Thank you.

推荐答案

首先备份 \wamp\wampmanager.tpl 因为这里的错误会导致 wampmanager 无法启动.

First make a backup of \wamp\wampmanager.tpl as mistakes in here can make wampmanager unstartable.

现在使用合适的编辑器而不是 notepad

Now edit \wamp\wampmanager.tpl using a decent editor and not notepad

找到这一行,大约是第 138 行

Find this line, its line 138 approx.

类型:项目;标题:${w_wwwDirectory}";行动:shellexecute;文件名:${wwwDir}";字形:2

Type: item; Caption: "${w_wwwDirectory}"; Action: shellexecute; FileName: "${wwwDir}"; Glyph: 2

将该行复制/粘贴到其下方,然后将其更改为这样的内容

Copy/Paste that line below itself and then change it to be something like this

类型:项目;标题:我的网站";行动:shellexecute;文件名:d:/文件/网站";字形:2

Type: item; Caption: "My Sites"; Action: shellexecute; FileName: "d:/Documents/Websites"; Glyph: 2

保存文件.

现在启动 WAMPServer 或者如果它实际上已经在运行,请执行以下操作刷新菜单:-

Now either start WAMPServer or if it was actually already running refresh the menus by doing :-

右键单击 wampmanager 图标 -> 刷新

rightclick on wampmanager icon -> refresh

您现在应该会看到您的新菜单.

You should now see your new menu.

如果您愿意,现在可以返回并删除创建 www 目录 菜单项的原始行.

If you want you could now go back and delete the original line that creates the www directory menu item.

这篇关于如何更改默认的“www 目录"用于 wampserver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆