Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 无法在web浏览器中查看响应正文预览_Html_Python 2.7_Web Services_Python Requests_Python Server Pages - Fatal编程技术网

Html 无法在web浏览器中查看响应正文预览

Html 无法在web浏览器中查看响应正文预览,html,python-2.7,web-services,python-requests,python-server-pages,Html,Python 2.7,Web Services,Python Requests,Python Server Pages,Iam在python服务器ip:10.1.0.1中运行这些 在我的firefox中,我输入了,但在浏览器中看不到任何东西 My entry_template.html文件: import codecs def do_GET_Index(self): self.set_HTTP_headers(200) HtmlFile3 = codecs.open('server/entry_template.html', 'r','utf-8') html_response =

Iam在python服务器ip:10.1.0.1中运行这些

在我的firefox中,我输入了,但在浏览器中看不到任何东西

My entry_template.html文件:

 import codecs
 def do_GET_Index(self):

    self.set_HTTP_headers(200)

    HtmlFile3 = codecs.open('server/entry_template.html', 'r','utf-8')
    html_response = HtmlFile3.read()

    self.wfile.write(html_reponse)

页面标题
这是一个标题
这是一段

提前感谢

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>

</body>
</html>