Python Http-server 使用

Python内置的下载服务器 http.server  Python的Web服务器

  1. python2 中SimpleHTTPServer
  2. python3 中 http.server

执行

1 python -m http.server

会在当前目录启动一个文件下载服务器,默认打开8000端口

如果当前目录下有index.html文件,默认显示该文件的内容

如果没有,默认显示当前目录下的文件列表

原文地址:https://www.cnblogs.com/ZhaoLong-study/p/11214199.html