如何在Mozilla Firefox中使用唯一的HTML打开本地文件? [英] how to open a local file in mozilla firefox using only HTML?
问题描述
我试图在Ubuntu上使用html打开Firefox上的本地磁盘上的文件。但是,我面临的文件没有找到错误。
我的代码如下:
< body>
< a href =/ home / abc / workspace / logfile.log> LOG FILE< / a>
< / body>
我试过使用file:///,但仍然没有打开文件。
file:///
协议: file:///home/abc/workspace/logfile.log
在一般情况下,出于安全原因,它不起作用。您可以通过编辑 about:config
或者使用扩展名来禁用安全检查,但是我不会推荐它。
这是 about:config
键:
安全性。 fileuri.strict_origin_policy
默认情况下 true
,你可以将它设置为 false
。
I am trying to open a file which is on the local disk on firefox using html on a ubuntu machine. But, I am facing file not found error. My code is as follows:
<body>
<a href="/home/abc/workspace/logfile.log">LOG FILE</a>
</body>
I tried using file:/// but still the file is not getting opened.
Use the file:///
protocol:
file:///home/abc/workspace/logfile.log
It does not work however for security reasons in a general case. You can disable the security check by editing about:config
, or by using an extension, however I would not recommend it.
This is the about:config
key:
security.fileuri.strict_origin_policy
It is true
by default, you can set it to false
.
这篇关于如何在Mozilla Firefox中使用唯一的HTML打开本地文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!