windows下用python 写cgi脚本,出现500错误,求各位明白的解答
我在Windows下尝试写CGI脚本,用Apache Haus配置好本地服务器后,写了一个小的脚本,但是怎么都跑不通,一直提示500错误。
#!D:\\python\python.exe
#encoding:gb2312
#import cgi,cgitb
print("Content-type:text/html\r\n\r\n")
print("Content-type:text/html\r\n\r\n")
print("<html>")
print("<head><title>Hello,python</title></head>")
a="100";
print("<body><h1>hello, i am " )
print(a)
print("</h1></body>")
print("</html>")
这是我的程序
这是Apache错误日志上的提示
Sat Sep 09 14:42:19.294293 2017] [cgi:error] [pid 18780:tid 1140] [client 127.0.0.1:54113] AH01215: D:\\python\\python.exe: can't open file '%L': [Errno 2] No such file or directory: D:/Apache24/cgi-bin/hello.py
求高手解答