Chinaunix首页 | 论坛 | 博客
  • 博客访问: 102440
  • 博文数量: 23
  • 博客积分: 555
  • 博客等级: 中士
  • 技术积分: 320
  • 用 户 组: 普通用户
  • 注册时间: 2011-11-14 11:04
文章分类

全部博文(23)

文章存档

2012年(23)

我的朋友

分类: WINDOWS

2012-04-04 20:55:14

不能太心急,磨刀不误砍柴功,不能一脑袋直接向目标上撞去。

初始状态:默认的WAMP配置
  1. LoadModule cgi_module modules/mod_cgi.so
动作:(httpd.conf中)
1,中(后面添加ExecCGI):
  1. Options Indexes FollowSymLinks ExecCGI
2,中:
  1.     # AddHandler allows you to map certain file extensions to "handlers":
  2.     # actions unrelated to filetype. These can be either built into the server
  3.     # or added with the Action directive (see below)
  4.     #
  5.     # To use CGI scripts outside of ScriptAliased directories:
  6.     # (You will also need to add "ExecCGI" to the "Options" directive.)
  7.     #
  8.     AddHandler cgi-script .cgi .py
3,编写的Python文件:(注意前三行,否则Internal Server Error

  1. #!D:\Python27\python.exe
  2. print "Content-type:text/html"
  3. print
  4. print "hello world"
阅读(5426) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~