$ python -m CGIHTTPServer 8000Serving HTTP on 0.0.0.0 port 8000 ...
$ mkdir cgi-bin/
$ vim cgi-bin/index.pyprint "Content-Type: text/html" # HTML is followingprint # blank line, end of headers
print "<TITLE>CGI script output</TITLE>"print "<H1>This is my first CGI script</H1>"print "Hello, world!"
http://localhost:8000/cgi-bin/index.py
This is my first CGI script
Hello, world!
375




被折叠的 条评论
为什么被折叠?



