Build a python web server

first step

By cmd命令提示符entering you want to set up a directory server, where I chose E盘the pythonfolder
Insert picture description here

Second step

Enter the command in this directory python -m http.server 8888(the following four digits are arbitrary)
Insert picture description here

third step

Next is the time to check the results. Open the browser and type in the address bar http://127.0.0.1:8888/(the last four digits here correspond to the previous ones) to access the folder directory selected in the first step.
Insert picture description here
Click on the prepared .htmlfile to view it Insert picture description here
注意. The terminal cannot be closed during the test, and your query operation can be detected at the terminal

Guess you like

Origin blog.csdn.net/weixin_43716048/article/details/95859192