我正在运行一个问题,我最近搬到了vps。我试图运行一个python CGI脚本,但我得到一个Apache脚本头错误的过早结束。脚本标题提前结束python cgi脚本错误
(我使用chmod + x中的脚本文件)
脚本很简单:
#!/usr/bin/env python
import cgi, cgitb
cgitb.enable()
print "Content-type: text/html"
print "<html><body>hello scritp</body></html>"
现在,如果我命名脚本测试** ** PY它运行在服务器上的罚款。但是,如果我以正确的方式执行此操作,则称它为test **。cgi **我收到内部服务器错误。
我从终端
./test.cgi
运行该脚本,我没有得到任何错误
Content-type: text/html
<html><body>hello scritp</body></html>
没有人本次发行前遇到过吗?并为其提供解决方案? :) 干杯