免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1791 | 回复: 0
打印 上一主题 下一主题

apache下python的配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-10 19:53 |只看该作者 |倒序浏览
使用python作为脚本,在apache服务器下跑,打算实现http://localhost/test.py/hello?id=123这种形式的网页配置要怎么弄啊?
脚本test.py的代码如下:
from mod_python import apache
def hello(req,id=""):
req.content_type = 'text/plain'
req.write("nice to meet you!");
if id:
  result = int(id)*2
  #req.write(result);
  return result
        else:
  req.write("no param.");
#req.write("hello world!")
        return apache.OK
一直无法配通.老是提示contains no 'handler'等这样或者那样的错误,哪位高人帮帮忙?不胜感激
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP