问题描述
这个Java代码,$ p $
< a href ='file:///+ curBP.get_build_path() +'> + curBP.get_build_path()+< / a>
被输出到浏览器。
在页面上,HTML是:
< a href =file:/// \\path\ to \shared\file>共享文件< / a>
但是,它不打开文件。我已经尝试了无数其他的斜杠组合,但无济于事。在FireFox中,它就像一个死链接,并不打开文件。在IE中,它的工作。
任何想法如何使它在FireFox中工作?不好的消息:Firefox已经关闭了一个安全漏洞:
$ b
p>
它要求 user 修改本地文件以允许file:// url。
This Java code,
"<a href='file:///" + curBP.get_build_path() + "'>" + curBP.get_build_path() + "</a>"
is outputted to the browser.
On the page, the HTML is:
<a href="file:///\\path\to\shared\file">Shared File</a>
However, it does not open the file. I've tried countless other combinations of slashes, but to no avail. In FireFox, it acts like a dead link and does not open the file. In IE, it works.
Any idea as to how to make it work in FireFox? Thanks!
Bad news: Firefox has closed a security hole:
http://www.techlifeweb.com/firefox/2006/07/how-to-open-file-links-in-firefox-15.html
It requires the user to modify a local file to allow file:// urls.
这篇关于< A>链接到本地文件? (< a href ='file:/// {path}'> DEAD LINK< / a>不在FireFox中工作,但在IE中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!