Python-CGI-(_uradom(16)),16)WindowsError:[错误5]访问被拒绝
运行这个简单的脚本来测试CGI设置Python-CGI-(_uradom(16)),16)WindowsError:[错误5]访问被拒绝,python,iis-7,cgi,Python,Iis 7,Cgi,运行这个简单的脚本来测试CGI设置 #!/usr/bin/python #import cgi print "Content-Type: text/plain\n\n" gender = "female" def display_vars (first_name, last_name, age): print (first_name, last_name, age, gender) def go_display(): gender = "male" display
#!/usr/bin/python
#import cgi
print "Content-Type: text/plain\n\n"
gender = "female"
def display_vars (first_name, last_name, age):
print (first_name, last_name, age, gender)
def go_display():
gender = "male"
display_vars("John", "Smith", 22)
go_display()
它工作并显示“('John','Smith',22','female')”
将上述内容从#导入cgi
更改为导入cgi
但它失败了
The specified CGI application misbehaved by not returning a complete set of HTTP headers.
(_urandom(16)), 16) WindowsError: [Error 5] Access is denied
加
在内容类型标题之前。
你应该用谷歌搜索你的错误信息。
你会发现:
还有:
添加
在内容类型标题之前。
你应该用谷歌搜索你的错误信息。
你会发现:
还有:
在random.py部分-\u uradom set except notimplemented错误:to except: 这对我有用。
如果您还有其他答案,请告诉我,我也会试试。在random.py部分-\u uradom set except notimplemented错误:to except: 这对我有用。 如果您有其他答案,请告诉我,我也会尝试。在应用程序池的高级设置中使用“HTTP/1.0 200 OK\n”打印和将用户配置文件加载为true时出现的相同错误已设置为true。使用“HTTP/1.0 200 OK\n”打印时出现的相同错误应用程序池的“高级设置”中的“将用户配置文件加载为true”已设置为true。
print "HTTP/1.0 200 OK\n";