有时候想共享文件给其他人使用可以通过 web的方式
使用Python3创建http server
输入命令
python3 -m http.server -b 192.168.11.123
打印:
Serving HTTP on 192.168.11.123 port 8000 ...
- 使用浏览器进行浏览文件:
打印如下:
192.168.11.200 - - [10/Apr/2019 17:10:45] "GET / HTTP/1.1" 200 -
192.168.11.200 - - [10/Apr/2019 17:10:45] code 404, message File not found
192.168.11.200 - - [10/Apr/2019 17:10:45] "GET /favicon.ico HTTP/1.1" 404 -
```
## 使用Python2.7 创建http server
```
python2.7 -m SimpleHTTPServer 8080
```