我想在我的sourceforge资源库中托管一个示例程序test.py。我从目录/home/project-web/motiur/cgi-bin/
上传了我的文件,然后去了motiur.sourceforge.net/cgi-bin/test.py
。不幸的是,我得到了一个错误,表明标题提前结束。在sourceforge中设置python
test.py的源代码:
#!/usr/local/bin/python
import cgi, cgitb
print "Content-type:text/html\n"
print "<html><body>This is another test</body></html>"
确切的错误是:
An error has been encountered in accessing this page.
1. Server: motiur.sourceforge.net
2. URL path: /cgi-bin/test.py
3. Error notes: Premature end of script headers: test.py
4. Error type: 500
5. Request method: GET
6. Request query string:
7. Time: 2013-01-12 14:49:39 UTC (1358002179)
顺便说一句,我使用FileZilla的窗口和已设置文件权限为755,即每个人都可以执行该文件。这是一个noob问题,一点帮助将不胜感激。谢谢。
什么是确切的错误? – yannis
@YannisRizos:错误在于;访问此页面时遇到错误。 1.服务器:motiur.sourceforge.net 2. URL路径:/cgi-bin/test.py 3.错误笔记:脚本头过早结束:test.py 4.错误类型:500 5。请求方法:GET 6.请求查询字符串: 7.时间:2013-01-12 14:49:39 UTC(1358002179) – motiur
@YannisRizos:任何建议..? – motiur