Karry Wang  

  在测试自己的python CGI脚本时, 当html网页中的表单form内容传送到服务器python脚本时, 总是出现Premature end of script headers错误, 网页显示是服务器端的内部错误。

  Internal Server Error

  The server encountered an internal error or misconfiguration and was unable to complete your request.

  Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

  More information about this error may be available in the server error log.

  从之前我遇到的一些类似情况看, 我大约知道这肯定又是脚本哪里出错了, 但是修改了脚本的每个地方依然还是出错, 最后在网上搜索相关文章的时候, 忽然看到#!/usr/bin/python, 就萌生了去检查一下自己的这句话是不是写错了, 当我真正看到我自己的那条语句的时候, 我的小伙伴们也惊呆了, " #/usr/bin/python "   holy shit, 居然少了一个#号。 如果你遇到类似的问题, 可以去看看是否是因为马虎漏掉了什么。。

  

posted on 2013-09-22 08:33  Karry Wang  阅读(1116)  评论(0编辑  收藏  举报