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

查看:28
本文介绍了如何在“--allow-file-access-from-files"处使用 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

推荐答案

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

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

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

来源

正如我在你的问题上看到的,不要忘记 Windows 有点类似于 Unix,所以当你输入chrome ..."时,cmd 会在 PATH 中搜索 Chrome,但一般来说 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

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

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