python not executed and code is shown literal in the page

前端 未结 1 965
遥遥无期
遥遥无期 2021-01-25 01:28

In ubuntu 12.04 i have this basic http server:

python -m SimpleHTTPServer

And this file demo.py

#!/usr/bin/python2.7
print \"Co         


        
相关标签:
1条回答
  • 2021-01-25 01:59

    SimpleHTTPServer can only serve static pages, not CGI scripts. You could use CGIHTTPServer instead.

    Use this only for local testing setups; these servers have hardly been battletested on the wider web and are almost certainly not secure.

    0 讨论(0)
提交回复
热议问题