这篇文章主要介绍了关于用Python3创建httpServer的简单方法,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下
看到有些帖子讲创建httpserver的方式很简单,如下:
imp<i style="color:transparent">本文来源gaodai$ma#com搞$$代**码)网8</i>ort SimpleHTTPServerSimpleHTTPServer.test()
但是在Python3*中根本就无法找到这个模块。
查看官方手册发现是这么来的。在指定文件夹运行如下
python -m http.server 8000
然后在浏览器中输入127.0.0.1:8000就能看到效果啦。
真是方便呀。
相关推荐:
Python实现简单http服务器
以上就是用Python3创建httpServer的简单方法的详细内容,更多请关注搞代码gaodaima其它相关文章!