#! /usr/bin/python2.7 """CGI test 2 - basic use of cgi module.""" import cgitb; cgitb.enable() import cgi def main(): form = cgi.FieldStorage() print "Content-type: text/html" print if not form: print "<h1>No Form Keys</h1>" else: print "<h1>Form Keys</h1>" for key in form.keys(): value = form[key].value print "<p>", cgi.escape(key), ":", cgi.escape(value) if __name__ == "__main__": main()
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
README | File | 437 B | 0644 |
|
cgi0.sh | File | 154 B | 0755 |
|
cgi1.py | File | 400 B | 0755 |
|
cgi1.pyc | File | 279 B | 0644 |
|
cgi1.pyo | File | 279 B | 0644 |
|
cgi2.py | File | 470 B | 0755 |
|
cgi2.pyc | File | 729 B | 0644 |
|
cgi2.pyo | File | 729 B | 0644 |
|
cgi3.py | File | 151 B | 0755 |
|
cgi3.pyc | File | 326 B | 0644 |
|
cgi3.pyo | File | 326 B | 0644 |
|
wiki.py | File | 3.94 KB | 0644 |
|
wiki.pyc | File | 5.25 KB | 0644 |
|
wiki.pyo | File | 5.25 KB | 0644 |
|