链接一个HTML页面上的UNC /网络驱动器 [英] Linking a UNC / Network drive on an html page

查看:154
本文介绍了链接一个HTML页面上的UNC /网络驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是一个基本的html链接问题。

我有一个Intranet设置,我需要链接到一些网络驱动器。它们位于诸如\server_drive\blahblah\doc.docx



之类的驱动器上。使用file://在IE8或Firefox上都不起作用。如何链接到这些文件?

解决方案

要从HTML文档链接到UNC路径,请使用file:/// //(是的,这是五个斜杠)。


file://///server/path/to/file.txt p>

请注意,这在IE和Outlook / Word中最为有用。它不会在Chrome或Firefox中工作,故意 - 链接将失败。 Mozilla团队中的一些词语:


出于安全考虑,Mozilla
应用程序会阻止从远程
文件到本地
文件(和目录)的链接。




而不是直接从 Google


Firefox和Chrome无法打开源自网页的file://链接来自本地机器外部。这是这些浏览器为提高安全性所做的设计决定。


Mozilla文章包含一组客户端设置,您可以使用它们来覆盖这种行为在Firefox中,并且有的扩展 browsers 以覆盖此限制。


Just a basic html link question.

I have an intranet setup, and I need to link to some network drives. They are located on drives such as \server_drive\blahblah\doc.docx

Using file:// does not work on either IE8 or Firefox. How can I link to these files?

解决方案

To link to a UNC path from an HTML document, use file:///// (yes, that's five slashes).

file://///server/path/to/file.txt

Note that this is most useful in IE and Outlook/Word. It won't work in Chrome or Firefox, intentionally - the link will fail silently. Some words from the Mozilla team:

For security purposes, Mozilla applications block links to local files (and directories) from remote files.

And less directly, from Google:

Firefox and Chrome doesn't open "file://" links from pages that originated from outside the local machine. This is a design decision made by those browsers to improve security.

The Mozilla article includes a set of client settings you can use to override this behavior in Firefox, and there are extensions for both browsers to override this restriction.

这篇关于链接一个HTML页面上的UNC /网络驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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