Python-标准库-http.server
Contents
该库用于快速构建一个静态服务器,如果在静态服务器根目录有index.html则直接返回index.html
-d选项配置根目录位置,不配置则为命令行的当前位置
|
|
当你的python3提示没有这个库时,使用如下命令
|
|
因为这个库是从SimpleHTTPServer改名过来的,可能你的python版本比较低,python2中使用 SimpleHTTPServer ,python3中使用 http.server