0
我有以下脚本作为我的CGI服务器:Python的CGIServer不重定向到index.html的
import BaseHTTPServer
import CGIHTTPServer
import cgitb; cgitb.enable() ## This line enables CGI error reporting
server = BaseHTTPServer.HTTPServer
handler = CGIHTTPServer.CGIHTTPRequestHandler
server_address = ("", 8600)
handler.cgi_directories = ['']
httpd = server(server_address, handler)
httpd.serve_forever()
,我有一个文件名为“index.html的”,这被链接到“main.cgi “运行服务器的目录内的可执行文件。但是,它似乎并没有工作。