Browse Source

Ying and Yang

master
Lukas Weber 3 years ago
parent
commit
4685f9ead1
3 changed files with 16 additions and 4 deletions
  1. 14
    2
      Server.py
  2. 1
    1
      Yang.html
  3. 1
    1
      Ying.html

+ 14
- 2
Server.py View File

def do_GET(self): def do_GET(self):
self.send_response(200) self.send_response(200)
self.end_headers() 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()

+ 1
- 1
Yang.html View File

<body> <body>
<div> Yang </div> <div> Yang </div>
<div> <div>
<a> href="Yong.html"</a>
<a href="Ying.html">Ying</a>
</div> </div>
</body> </body>
</html> </html>

+ 1
- 1
Ying.html View File

<body> <body>
<div> Ying </div> <div> Ying </div>
<div> <div>
<a> href= "Yang.htlm" </a>
<a href= "Yang.htlm">Yang</a>
</div> </div>
</body> </body>
</html> </html>

Loading…
Cancel
Save