First make sure that the python installation and environment configuration are complete, and then find the location of the html file through DOS commands.
Enter the following on the command line:
python -m http.server 8888 ----------(8888为端口号,也可设置为其它)
In this way, a simple Web server is built. Enter
localhost:8888
in the browser to access via IP address
The above is the detailed content of How to build the simplest web server using python. For more information, please follow other related articles on the PHP Chinese website!