Windows共享文件夹的URL [英] An URL to a Windows shared folder
问题描述
有没有办法将一个Windows共享文件夹的工作链接合并到HTML页面中?例如。一个链接到 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\将会在Windows机器上打开(当然也可以在
server
所在的同一个intranet上。)
我用 file://
方案尝试了一些技巧,但它们都没有效果。
我认为有两个问题:
- 您需要跳过斜线。 >
- 浏览器安全性。
解释:
-
我检查了一个我的模式:
< a href =file:///// server01\fshare\dir1\dir2\dir3>有用的连结< / a>
请注意,在协议(
file: )
Firefox会尝试阻止跨站脚本。我的解决方案是修改profile目录中的 prefs.js 。您将添加两行:
user_pref(capability.policy.localfilelinks.checkloaduri.enabled,allAccess);
user_pref(capability.policy.localfilelinks.sites,http://mysite.company.org);
Is there a way to incorporate a working link to a Windows shared folder into an HTML page? E.g. a link to \\server\folder\path
?
For simplicity, let's say the page will be opened on a Windows machine (and on the same intranet where the server
is located, of course.)
I've tried a few tricks with file://
scheme, but none of them seemed to work.
I think there are two issues:
- You need to escape the slashes.
- Browser security.
Explanation:
I checked one of mine, I have the pattern:
<a href="file://///server01\fshare\dir1\dir2\dir3">useful link </a>
Please note that we ended up with 5 slashes after the protocol (
file:
)Firefox will try to prevent cross site scripting. My solution was to modify prefs.js in the profile directory. You will add two lines:
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess"); user_pref("capability.policy.localfilelinks.sites", "http://mysite.company.org");
这篇关于Windows共享文件夹的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!