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

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

问题描述

有没有办法将 working 链接到 Windows 共享文件夹合并到 HTML 页面中?例如.\serverfolderpath?

Is there a way to incorporate a working link to a Windows shared folder into an HTML page? E.g. a link to \serverfolderpath?

为简单起见,假设页面将在 Windows 机器上打开(当然,在 server 所在的同一内联网上.)

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

我已经尝试了一些使用 file:// 方案的技巧,但它们似乎都不起作用.

I've tried a few tricks with file:// scheme, but none of them seemed to work.

推荐答案

我觉得有两个问题:

  1. 你需要避开斜线.
  2. 浏览器安全.

说明:

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

  1. I checked one of mine, I have the pattern:

<a href="file://///server01fsharedir1dir2dir3">useful link </a>

请注意,我们在协议(file:)之后加上了 5 个斜杠

Please note that we ended up with 5 slashes after the protocol (file:)

Firefox 将尝试阻止跨站点脚本.我的解决方案是修改配置文件目录中的 prefs.js.您将添加两行:

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天全站免登陆