zoukankan      html  css  js  c++  java
  • [Python]python CGI脚本在apache服务器上运行时出现“Premature end of script headers”错误

      在测试自己的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, 居然少了一个#号。 如果你遇到类似的问题, 可以去看看是否是因为马虎漏掉了什么。。

      

  • 相关阅读:
    事件对象
    type of 操作符和instanceof操作符的区别以及使用方法
    JS:XML
    JS:事件处理程序
    JS:event对象下的target属性和取消冒泡事件
    JS:callee属性
    JS:call()和apply的区别
    JS:事件对象1
    DOM元素的大小和位置
    CSS:在IE浏览器下,元素下沉一行的解决办法
  • 原文地址:https://www.cnblogs.com/KarryWang/p/3332467.html
Copyright © 2011-2022 走看看