Windows共享文件夹的URL [英] An URL to a Windows shared folder

查看:1309
本文介绍了Windows共享文件夹的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法将一个Windows共享文件夹的工作链接合并到HTML页面中?例如。一个链接到 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\将会在Windows机器上打开(当然也可以在 server 所在的同一个intranet上。)



我用 file:// 方案尝试了一些技巧,但它们都没有效果。

解决方案

我认为有两个问题:


  1. 您需要跳过斜线。
  2. >
  3. 浏览器安全性。

解释:


  1. 我检查了一个我的模式:

     < a href =file:///// server01\fshare\dir1\dir2\dir3>有用的连结< / a> 

    请注意,在协议( file: )

  2. 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:

  1. You need to escape the slashes.
  2. Browser security.

Explanation:

  1. 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:)

  2. 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屋!

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