@@ -5,5 +5,17 @@ class EigenerHandler(http.server.BaseHTTPRequestHandler): | |||
def do_GET(self): | |||
self.send_response(200) | |||
self.end_headers() | |||
msg = | |||
self.wfile.write() | |||
if(self.path == "/Yang.htlm"): | |||
with open("Yang.html", "r") as f: | |||
msg = f.read() | |||
else: | |||
with open("Ying.html", "r") as f: | |||
msg = f.read() | |||
self.wfile.write(msg.encode('utf-8')) | |||
port = 12345 | |||
handler = EigenerHandler | |||
address = ('', port) | |||
server = http.server.HTTPServer(address, handler) | |||
server.serve_forever() |
@@ -7,7 +7,7 @@ | |||
<body> | |||
<div> Yang </div> | |||
<div> | |||
<a> href="Yong.html"</a> | |||
<a href="Ying.html">Ying</a> | |||
</div> | |||
</body> | |||
</html> |
@@ -7,7 +7,7 @@ | |||
<body> | |||
<div> Ying </div> | |||
<div> | |||
<a> href= "Yang.htlm" </a> | |||
<a href= "Yang.htlm">Yang</a> | |||
</div> | |||
</body> | |||
</html> |