Getting python to work, Internal Server Error

后端 未结 12 1533
無奈伤痛
無奈伤痛 2021-02-08 11:07

I\'m trying to get Python scripts, called from a web browser, to work. I keep getting the error:

500 Internal Server Error

When I check my err

12条回答
  •  悲&欢浪女
    2021-02-08 11:51

    If you have configured Apaches httpd file correctly then you might be getting this error for following two reasons.Make sure these are correct.

    1. Include '#!/usr/bin/python' or '#!C:/Python27/python' or accordingly in your script as first line.
    2. Make sure there is space after print "Content-type: text/html" ie.
      print "Content-type: text/html\n\n";
      Hope this helps!!

提交回复
热议问题