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

      

  • 相关阅读:
    菜鸟学存储:网络存储IP SAN与IB SAN
    读xml高手
    预先加载图片
    xred520
    最简单准确的硬盘整数分区设置操作方法
    Google 每天处理约 20000TB 的数据
    IE 8 无法正常使用网站后台编辑器问题
    常用的JS技术1
    adodb stream 使用说明
    [Tools] JDGUI(Java Decompiler)
  • 原文地址:https://www.cnblogs.com/KarryWang/p/3332467.html
Copyright © 2011-2022 走看看