Ho provato a mettere un file .py nella directory /cgi-bin/ e quando provo ad accederci mi dà l'errore 500: "Internal Server Error".
Nel file c'è scritto:
codice:
#!C:\Python\python.exe
print 'Content-type: text/html'
print ' '
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">'
print '<HTML><HEAD><TITLE>cgi-bin test</TITLE></HEAD>'
print '<BODY>Hello, World!</BODY></HTML>'
ma ho provato anche con:
codice:
#!/usr/bin/env python
print "Content-type: text/html\r\n\r\n"
print 'Hello python'
e il risultato non cambia...!