1.windows 10系统,使用Apache服务器,HTML文件hello_get.html的路径是E:\var\www
2.Python版本是3.7.1,Python文件hello_get.py的路径是:E:\var\www\cgi-bin
3.hello_get.html文件如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
</head>
<body>
<form action="cgi-bin/hello_get.py" method="get">
站点名称: <input type="text" name="name"> <br />
站点URL:<input type="text" name="url" />
<input type="submit" value="提交" />
</form>
</body>
</html>
4.hello_get.py文件如下:
#!E:/Python/python.exe
#-*- coding:UTF-8 -*-
#filename:hello_get.py
#CGI处理模块
import cgi,cgitb
#创建 FieldStorage 的实例化
f