python創建一個最簡單httpwebserver服務器的方法:importsysimportBaseHTTPServerfromSimpleHTTPServerimportSimpleHTTPRequestHandlerHandler=SimpleHTTPRequestHandlerServer=BaseHTTPServer.HTTPServerProtocol="HTTP/1.0"ifsys.argv[1:]:port=int(sys.argv[1])else:port=8000server_address=('127.0.0.1',port)Handler.protocol_version=Protocolhttpd=Server(server_address,Handler)print("ServingHTTP")httpd.serve_forever()
網站導航
- zblogPHP模板zbpkf
- zblog免費模板zblogfree
- zblog模板學習zblogxuexi
- zblogPHP仿站zbpfang