擅长:python、mysql、java
<p><b>尝试此脚本</b></p>
<pre><code>#!/usr/bin/env python
import cgi;
import cgitb;cgitb.enable()
print "Content-Type: text/html"
print "" #use this double quote print statement to add a blank line in the script
print "<b>Hello python</b>"
</code></pre>
<p>标题和主html内容之间应该有一行空格。这就是为什么在脚本中启动html标记之前必须使用额外的print语句。</p>