mongooseWebサーバーでPythonスクリプトを実行したいと思います。php-cgi.exeでは正常に機能しましたが、python.exeでは機能しませんでした。
テストスクリプトtest.py:
print("Content-Type: text/html")
print("")
print("<h1>Hello World!</h1>")
マングース構成mongoose.conf:
m .py=text/html
c py
I C:\\python\\python.exe
コマンドプロンプトからスクリプトを試しましたが、正しく返されます。
Content-Type: text/html
<h1>Hello World!</h1>
http://localhost/test.pyを呼び出すと、次のようになります。
print("Content-Type: text/html")
print("")
print("<h1>Hello World!</h1>")
したがって、Pythonコードは解釈されず、エラーはログに記録されません。