1.After install XAMPP,we need add the path of the Mysql

just find the path and add it to your sys-path of windows

try it from the cmd and chang the password for the root user:

2.try the new password:

3.find the httpd.conf in the path:

xampp\apache\conf

add the following lines to the file :

AddHandler cgi-script .cgi .pl .asp .py

AddType text/html .shtml .py

Options Indexes FollowSymLinks Includes ExecCGI

4.try the code in the cgi-bin path:

hello.py:

#!D:\Python27\python.exe

print "Content-Type: text/html\n"
print "<html><title>hello CGI</title><body><h1>Hello Python CGI</h1></body></html>"

5.add then open the url name this:

http://localhost/cgi-bin/hello.py

Configuration python CGI in XAMPP in win-7的更多相关文章

  1. Windows 配置 Apache Python CGI

    提示:安装Apache可参考 https://jingyan.baidu.com/article/0eb457e53c019f03f1a905c7.html 1.  打开URL: https://ww ...

  2. Apache运行python cgi程序

    Apache运行python cgi程序 环境 win10 x64 专业版 Apache2.4 python 2.7 Apache安装和配置 Apache服务器的安装请自行搜索.在Apache2.4中 ...

  3. Python CGI编程和CGIHTTPServer

    Python2.7 的CGIHTTPServer 可以作为一个简单的HTTP服务器,能够调用cgi脚本 1 在任意目录下创建一个特殊的目录 cgi-bin ,用于存放自己写的脚本(.py或.cgi) ...

  4. Python CGI编程(转自易百)

    Python CGI编程 Python的CGI编程,公共网关接口或CGI,Web服务器和一个自定义的脚本之间交换信息是一组定义的标准.     什么是CGI ? 公共网关接口或CGI,Web服务器和一 ...

  5. [Python]python CGI脚本在apache服务器上运行时出现“Premature end of script headers”错误

    在测试自己的python CGI脚本时, 当html网页中的表单form内容传送到服务器python脚本时, 总是出现Premature end of script headers错误, 网页显示是服 ...

  6. Configure Tomcat 7 to run Python CGI scripts in windows(Win7系统配置tomcat服务器,使用python进行cgi编程)

    Pre-installation requirements1. Java2. Python steps1. Download latest version of Tomcat (Tomcat 7) f ...

  7. python CGI编程-----简单的本地使用(1)

    本章节需要安装python开发工具,window平台安装地址:https://www.python.org/downloads/windows/,linux安装地址:https://www.pytho ...

  8. Common Gateway Interface Python CGI编程

    https://en.wikipedia.org/wiki/Gateway_(telecommunications) In telecommunications, the term gateway r ...

  9. 彻底解决python cgi 编程出现的编码问题

    Answering this for late-comers because I don't think that the posted answers get to the root of the ...

随机推荐

  1. jquery datatable[表格处理]

    最近在公司实习发现一个额功能强大的表格解决方案,了解了一下,先总结如下: 1.官网:http://www.datatables.net/ 2.需要特别注意:被dataTable处理的table对象,必 ...

  2. 关于linux系统安全配置脚本

    本脚本是第二次更新,已经大量应用在某大型媒体网站体系中,加入了之前没有想到的一些安全设置.使用方法将其复制,保存为一个shell文件,比如security.sh.将其上传到Linux服务器上,执行sh ...

  3. 使用autolayout的NSLayoutConstraint类中的constraintWithItem 、constraintsWithVisualFormat这两个类方法来创建视图并可以实现自动布局

    #import "ViewController.h" @interface ViewController () @end @implementation ViewControlle ...

  4. 干货:VLDB论文摘要-阿里技术突破性创新

    阿里技术突破性创新 世界顶级大规模数据处理分析管理会议VLDB(VERY LARGE DATA BASE)于9月1日至5日在杭州举办,该会议也是也是大数据云计算领域的盛会,阿里巴巴两个团队在这个会议上 ...

  5. iOS UILable的一些用法

    1.按钮上的文字添加下划线 问题:实现下图中右侧的按钮文字效果 代码(绿色为按钮文字加下划线方法): [MyTools createMyImageview:topEditView frame:CGRe ...

  6. [原创] Web UI自动化应用测试框架实践 - 概览

    之前为我们部门做的一个UI框架.不能纯粹解读为框架,主要是做了一些简单的分层设计,以解决稳定性.降低复杂性.提升可维护性以及快速构建测试用例等实际问题. 主要部分:1. 测试数据.主要提供测试类库需要 ...

  7. jquery.validate.js实例演示

    validate是前端重要的交互手段,提升性能的同时更能提升用户操作体验,validate的实现大概有三种方式:HTML5部分支 持,validate验证框架,手动写js或ajax调用接口.使用val ...

  8. C#中Invoke和BeginInvoke的区别

    1.Invoke() 调用时,Invoke会阻止当前主线程的运行,等到 Invoke() 方法返回才继续执行后面的代码,表现出“同步”的概念. 2.BeginInvoke() 调用时,当前线程会启用线 ...

  9. Http StatuCode说明

    HTTP 200 - 文件被正常的访问 HTTP 302 - 临时重定向 HTTP 400 - 请求无效 HTTP 401.1 - 未授权:登录失败 HTTP 401.2 - 未授权:服务器配置问题导 ...

  10. p45.asm

    ; ========================================== ; pmtest3.asm ; 编译方法:nasm pmtest3.asm -o pmtest3.com ; ...