Cgi.FieldStorage () is broken

I am running a very simple python webapp with python2.7, and cgi.FieldStorage () always returns FieldStorage (None, None, []) even when entering arguments. The source code of my test

    #!/usr/bin/python
    import cgi
    print "Content-type: text/html"
    print
    print cgi.FieldStorage()

and even when I send url as url.py?arg=test&arg2=test

FieldStorage field is returned in my web browser (None, None, []). What's happening?

+4
source share

All Articles