\u4f7f\u7528POST\u65b9\u6cd5\u4f20\u9012\u6570\u636e<\/strong><\/div>\n\u4f7f\u7528POST\u65b9\u6cd5\u5411\u670d\u52a1\u5668\u4f20\u9012\u6570\u636e\u662f\u66f4\u5b89\u5168\u53ef\u9760\u7684\uff0c\u50cf\u4e00\u4e9b\u654f\u611f\u4fe1\u606f\u5982\u7528\u6237\u5bc6\u7801\u7b49\u9700\u8981\u4f7f\u7528POST\u4f20\u8f93\u6570\u636e\u3002<\/p>\n
\u4ee5\u4e0b\u540c\u6837\u662fhello_get.py \uff0c\u5b83\u4e5f\u53ef\u4ee5\u5904\u7406\u6d4f\u89c8\u5668\u63d0\u4ea4\u7684POST\u8868\u5355\u6570\u636e:<\/p>\n
#!\/usr\/bin\/python3\r\n\r\n# CGI\u5904\u7406\u6a21\u5757\r\nimport cgi, cgitb \r\n\r\n# \u521b\u5efa FieldStorage \u7684\u5b9e\u4f8b\u5316\r\nform = cgi.FieldStorage() \r\n\r\n# \u83b7\u53d6\u6570\u636e\r\nsite_name = form.getvalue('name')\r\nsite_url = form.getvalue('url')\r\n\r\nprint (\"Content-type:text\/html\")\r\nprint ()\r\nprint (\"\")\r\nprint (\"\")\r\nprint (\"\")\r\nprint (\"\")\r\nprint (\"\")\r\nprint (\"\")\r\n\r\nprint (\"\")<\/pre>\n\u4ee5\u4e0b\u4e3a\u8868\u5355\u901a\u8fc7POST\u65b9\u6cd5\uff08method=\"post\"\uff09\u5411\u670d\u52a1\u5668\u811a\u672c hello_get.py \u63d0\u4ea4\u6570\u636e:<\/p>\n
<!DOCTYPE html><\/span>\r\n<html><\/span>\r\n<head><\/span>\r\n<meta<\/span> charset<\/span>=<\/span>\"utf-8\"<\/span>><\/span>\r\n<title><\/span>\u83dc\u9e1f\u6559\u7a0b(runoob.com)<\/span><\/title><\/span>\r\n<\/head><\/span>\r\n<body><\/span>\r\n<form<\/span> action<\/span>=<\/span>\"\/cgi-bin\/hello_get.py\"<\/span> method<\/span>=<\/span>\"post\"<\/span>><\/span>\r\n\u7ad9\u70b9\u540d\u79f0: <\/span><input<\/span> type<\/span>=<\/span>\"text\"<\/span> name<\/span>=<\/span>\"name\"<\/span>><\/span> <br<\/span> \/><\/span>\r\n\r\n\u7ad9\u70b9 URL: <\/span><input<\/span> type<\/span>=<\/span>\"text\"<\/span> name<\/span>=<\/span>\"url\"<\/span> \/><\/span>\r\n<input<\/span> type<\/span>=<\/span>\"submit\"<\/span> value<\/span>=<\/span>\"\u63d0\u4ea4\"<\/span> \/><\/span>\r\n<\/form><\/span>\r\n<\/body><\/span>\r\n<\/html><\/span>\r\n<\/form><\/span><\/pre>\nGif \u6f14\u793a\u5982\u4e0b\u6240\u793a\uff1a
\n<\/p>\n","protected":false},"excerpt":{"rendered":"
GET\u65b9\u6cd5\u53d1\u9001\u7f16\u7801\u540e\u7684\u7528\u6237\u4fe1\u606f\u5230\u670d\u52a1\u7aef\uff0c\u6570\u636e\u4fe1\u606f\u5305\u542b\u5728\u8bf7\u6c42\u9875\u9762\u7684URL\u4e0a\uff0c\u4ee5”?”\u53f7\u5206\u5272, \u5982\u4e0b\u6240\u793a\uff1a htt […]<\/p>\n","protected":false},"author":1470,"featured_media":167262,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-167260","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/167260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1470"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=167260"}],"version-history":[{"count":8,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/167260\/revisions"}],"predecessor-version":[{"id":167497,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/167260\/revisions\/167497"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/167262"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=167260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=167260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=167260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}