python for cgi

来源:互联网 发布:恶意软件清除工具 编辑:程序博客网 时间:2024/05/22 09:02

 

First when using "print" to output information to browser, the first line must be "Content-type: text/html". the value of type could be other file formats that browser can parse.

 

 

The second thins should be noted is that: the first line of python should be “#! python_path/python.exe -u" to print out to web-server.

or

Add "ScriptInterpreterSource Registry" to the bottom of Apache/conf/httpd.conf

and maybe you should to add:

 SetEnv PYTHONUNBUFFERED 1

 PassEnv PYTHONPATH

 

 

原创粉丝点击