How to develop a web project with local files?

Hello all,

When you develop a web project in your environment and you try to work with iframes for showing some file/files, maybe you get this error:

Not allowed to load local resource: XXXPath.

To prevent this, you may use your project local directory. But if you do not want this, another way possible:

To create a mini http server with python

To do this you should have python installed in your environment.

If you installed python just run this command in your file directory:
python -m http.server 8000
Herewith, you can access your file via a http local url. Like here:

原文链接:How to develop a web project with local files?

© 版权声明
THE END
喜欢就支持一下吧
点赞8 分享
Be happy for this moment, this moment is your life.
享受当下的快乐,因为这一刻正是你的人生
评论 抢沙发

请登录后发表评论

    暂无评论内容