如何在“ - 使用Chrome浏览器启动HTML” - “允许文件从文件访问”模式? [英] How to launch html using Chrome at "--allow-file-access-from-files" mode?

查看:1028
本文介绍了如何在“ - 使用Chrome浏览器启动HTML” - “允许文件从文件访问”模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与此处有相同的情况

为了解决这个问题,我必须在--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.


  1. 在Windows 7下启动cmd
  2. 指向chrome.exe文件夹

  3. 执行此操作 chrome --allow-file-access-from-files file:/// C: /test%20-%203.html

  1. start cmd under windows 7
  2. direct to chrome.exe folder
  3. 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屋!

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