python编程_python通过get方式,post方式发送http请求和接收http响应_import urllib模块,import urllib2模块,import httplib模块
测试用CGI,名字为test.py,放在apache的cgi-bin目录下:#!/usr/bin/pythonimportcgidefmain():print"Content-type:text/html\n"form=cgi.FieldStorage()ifform.has_key("ServiceCode")andform["ServiceCode"].value!="":print"Hell