python for cgi

 

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

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章