Python 3 启动 http server 发表于: 2023-07-11 分类于: python 字数: 99 阅读:≈ 1分钟 浏览: 评论: Python 3 启动 http server 使用 python 3.x 快速启动一个 http server 1 2 3 4 5 6 7 8 9 10 11 # 在当前目录下启动 http server ,端口号为 8000 python -m http.server # 指定端口号 python -m http.server 8080 # 指定目录: 使用 -d 参数 python -m http.server -d /www-data/ # 指定监听地址: 使用 --bind 参数 python -m http.server --bind 127.0.0.1参考地址: https://docs.python.org/3/library/http.server.html|