Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../lib64/python2..../Demo/cgi
File: cgi2.py
#! /usr/bin/python2.7
[0] Fix | Delete
[1] Fix | Delete
"""CGI test 2 - basic use of cgi module."""
[2] Fix | Delete
[3] Fix | Delete
import cgitb; cgitb.enable()
[4] Fix | Delete
[5] Fix | Delete
import cgi
[6] Fix | Delete
[7] Fix | Delete
def main():
[8] Fix | Delete
form = cgi.FieldStorage()
[9] Fix | Delete
print "Content-type: text/html"
[10] Fix | Delete
print
[11] Fix | Delete
if not form:
[12] Fix | Delete
print "<h1>No Form Keys</h1>"
[13] Fix | Delete
else:
[14] Fix | Delete
print "<h1>Form Keys</h1>"
[15] Fix | Delete
for key in form.keys():
[16] Fix | Delete
value = form[key].value
[17] Fix | Delete
print "<p>", cgi.escape(key), ":", cgi.escape(value)
[18] Fix | Delete
[19] Fix | Delete
if __name__ == "__main__":
[20] Fix | Delete
main()
[21] Fix | Delete
[22] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function