python -m SimpleHTTPServer

Server

Enter the following sentence in Linux System.

python -m SimpleHTTPServer

The program output the following contents, indicates that the server is started, and listen on 8000.

Serving HTTP on 0.0.0.0 port 8000 ...

Client

Enter another server as a client, download the files from server in the directory the command python -m SimpleHTTPServer is executed.

curl $SERVER_IP:8000/file > local-file
上一篇:java – 使用HTTPHandler上传文件


下一篇:Python SimpleHTTPServer 转载:https://www.cnblogs.com/nopnog/p/8116848.html