Created
April 30, 2011 23:15
-
-
Save yukioc/950081 to your computer and use it in GitHub Desktop.
cgi environment values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
print "Content-Type: text/html\n\n"; | |
print "<html><body><table border='1'>"; | |
print "<tr><th>$_</th><td>$ENV{$_}</td></tr>" for (sort(keys(%ENV))); | |
print "</table></body></html>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
print "Content-Type: text/html\n" | |
print "<html><body><table border='1'>" | |
for k,v in sorted(os.environ.iteritems()): | |
print "<tr><th>%s</th><td>%s</td></tr>" % (k,v) | |
print "</table></body></html>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment