Error 500: Premature end of script headers

前端 未结 15 1489
臣服心动
臣服心动 2020-12-01 14:31

I get a \"Premature end of script headers: contactform.cgi\" error message when running the below script. What frustrates me is that I ran this as a .php on another server

15条回答
  •  被撕碎了的回忆
    2020-12-01 14:32

    u forgot to add proper content-type header in the response which is a must have http header when hosting on apache2

    use

    print "Content-type:text/html\r\n\r\n"
    

    or

    header('Content-Type: text/html');
    

提交回复
热议问题