为什么我localhost:8080
在浏览器中进入时背景不是蓝色的?以下3个文件都位于同一目录中:
wsgiwebsite.py
#!/usr/bin/env python
from wsgiref.simple_server import make_server
cont = (open('wsgiwebsite_content.html').read())
def application(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/html')])
return [cont]
server = make_server('0.0.0.0', 8080, application)
server.serve_forever()
wsgiwebsite_content.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="wsgiwebsite_style.css">
</head>
<body>
This is my first web page
</body>
</html>
wsgiwebsite_style.css
body{background-color:blue;}