我想检查一个需要使用 google chrome 访问文件的 javascript 项目。我试图添加:
--allow-file-access-from-files --disable-web-security
到浏览器,但由于 chrome 的多个实例,我无法得到结果。
现在我正在尝试使用 Python 设置服务器,因此我不必访问文件。我安装了 Python 3.3.2 并将目录路径设置为我的项目文件位置。代码是:
python -m http.server
但我越来越
文件“(stdin)”,第 1 行
python -m http.server
^
SyndaxError:无效的语法
我知道我的问题对于 Mozilla 来说不是问题,但我需要让它与 Chrome 一起使用。