如何在“--allow-file-access-from-files"中使用 Chrome 启动 html模式? [英] How to launch html using Chrome at "--allow-file-access-from-files" mode?

查看:39
本文介绍了如何在“--allow-file-access-from-files"中使用 Chrome 启动 html模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里>

为了解决这个问题,我必须在--allow-file-access-from-files"模式下使用 Chrome 启动 html 文件.我尝试了很多次后续步骤,但它不起作用.

  1. 在windows 7下启动cmd
  2. 直接到 chrome.exe 文件夹
  3. 这样做 chrome --allow-file-access-from-files file:///C:/test%20-%203.html

解决方案

搜索 Chrome 可执行文件的路径,然后在 cmd 上尝试:

>"C:PathToChrome.exe" --allow-file-access-from-files

来源

正如我在你的问题中看到的,不要忘记 Windows 与 Unix 有点相似,所以当你输入chrome ..."时,cmd 将在 PATH 中搜索 Chrome,但通常 Chrome 文件夹不是在路径上.此外,您没有为可执行文件指定扩展名...因此,如果您移动到 ​​Chrome 的文件夹,此命令也可能会起作用:

>.chrome.exe --allow-file-access-from-files

I have the same situation with HERE

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

解决方案

Search for the path of your Chrome executable and then, on your cmd, try :

> "C:PathToChrome.exe" --allow-file-access-from-files

Source

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

这篇关于如何在“--allow-file-access-from-files"中使用 Chrome 启动 html模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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