如何在“ - 使用Chrome浏览器启动HTML” - “允许文件从文件访问”模式? [英] How to launch html using Chrome at "--allow-file-access-from-files" mode?
问题描述
我与此处有相同的情况
为了解决这个问题,我必须在--allow-file-access-from-files模式下使用Chrome启动html文件。
我多次尝试后续步骤,但无效。
And to solve this problem I have to launch html file using Chrome at "--allow-file-access-from-files" mode. I tried next steps many times, but it doesn't work.
- 在Windows 7下启动cmd
- 指向chrome.exe文件夹
- 执行此操作
chrome --allow-file-access-from-files file:/// C: /test%20-%203.html
- start cmd under windows 7
- direct to chrome.exe folder
- do this
chrome --allow-file-access-from-files file:///C:/test%20-%203.html
推荐答案
搜索您的Chrome可执行文件的路径,然后在您的cmd上尝试:
Search for the path of your Chrome executable and then, on your cmd, try :
> "C:\PathTo\Chrome.exe" --allow-file-access-from-files
<编辑:
正如我在你的问题上看到的,不要忘记Windows有点类似于Unix,所以当你键入chrome ...时,cmd将搜索Chrome PATH,但通常Chrome文件夹不在PATH上。此外,您不需要为可执行文件指定扩展名...因此,如果您转移到Chrome的文件夹,该命令可能也会起作用:
EDIT : As I see on your question, don't forget that Windows is a little bit similar to Unix, so when you type "chrome ...", cmd will search for Chrome in the PATH, but in general the Chrome folder isn't on the PATH. Also, you don't specify an extension for your executable... So if you move to Chrome's folder, this command will probably work too :
> .\chrome.exe --allow-file-access-from-files
这篇关于如何在“ - 使用Chrome浏览器启动HTML” - “允许文件从文件访问”模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!