2024-05-05 18:00:55 发布
网友
我试图学习如何使用Apache执行python代码。在阅读了各种教程之后,我配置了conf文件 如下所示,以允许python代码执行。你知道吗
000-default.conf:
000-default.conf
我的python程序hello.py如下所示:
hello.py
程序放在/var/www/html/cgi-bin/目录下。设置完所有这些之后,当我转到文件的地址(www.domainname.com/cgi-bin/hello.py)时,我遇到了以下错误。你知道吗
/var/www/html/cgi-bin/
www.domainname.com/cgi-bin/hello.py
如何解决此错误并运行我的代码?你知道吗
在python文件中需要一个处理程序。你知道吗
from mod_python import apache def handler(req): req.content_type = "text/plain" req.write("Hello World!") return apache.OK
在python文件中需要一个处理程序。你知道吗
相关问题 更多 >
编程相关推荐