python自带服务器的使用方法
- 进入待分享的目录
- 执行命令
python 2
python -m SimpleHTTPServer 端口号
默认端口号是8000
>>> C:\Users\Administrator>python2 -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
127.0.0.1 - - [11/Oct/2019 10:29:30] "GET / HTTP/1.1" 200 -
python 3
python -m http.server 端口号
默认端口号是8000
>>> C:\Users\Administrator>python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
127.0.0.1 - - [11/Oct/2019 10:35:33] "GET / HTTP/1.1" 200 -
- 打开浏览器访问该主机的地址
http://自己电脑ip_address:端口号/
不知道 ip 的自行百度
注意:被访问和访问的机器必须在同一个网段中,或者说网络环境相同
访问效果:

网友评论