python SimpleHTTPServer 2

慎弘化
2023-12-01

1: 创建一个html文件

代码为 Hello World!

文件名为:index.html


2: 创建一个test.py文件

代码为: improt SimpleHTTPServer

SimpleHTTPServer.test();


3: 命令提示符下,跳转到test.py文件所在的目录

输入 python test.py

4:会出现这样的字段 Serving HTTP on 0.0.0.0 port 8000 ...


5:在浏览器中输入 http://localhost:8000/

会出现Hello World! 字段

 类似资料:

相关阅读

相关文章

相关问答