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. Spring mvc编码配置

    Spring3 MVC也带有自己的编码: jar包:org.springframework.web-3.0.0.RELEASE.jar 只需要在web.xml配置即可: <!-- spring ...

  2. CNZZ每天百亿条日志写入,SLS+ODPS轻松拆招

    如果你是一个站长,想要提交一个查询,从一亿多条日志中找出从湖南省发出.使用ISP电信.通过百度搜索跳转到达的访问日志.该怎么做? 别急,在接收到您的查询条件后,CNZZ可以快速通过SLS(简单日志服务 ...

  3. vs2010 MFC Opengl实现

    有的人说,学习要按部就班,学了几年的编程稍有点感悟,个人觉得面对技术的不断变化,以及需求的不断变更,如果按部就班的来搞,人生0.5的时间就浪费了,很多时候问自己,why I do need to le ...

  4. 新手不了解Xcode和mac系统可能犯得错误和我的建议

    我是学iOS刚入门的新手,本人装的时黑苹果,我是喜欢完美的人,但黑苹果又是不完美的系统,比如关不了机啊,和显卡驱动不了啊,当自己的电脑出现白屏和卡顿的时候气的没脾气.我是一个新手.开始学的时java但 ...

  5. Unity封装dll教程整理

    ///作者Unity3d师兄---LeroyYang 通过网上大神们的资料以及自己的整理,学习一下用vs2013简单的封装dll文件,方便接口模式下开发,使得逻辑层更为清晰. 操作步骤 1.打开vs2 ...

  6. Kinect For Windows V2开发日志七:照片合成与背景消除

    上一篇里讲到了Kinect可以从环境中区分出人体来.因此可以利用这个功能,来把摄像头前的人合成进照片里,和利用Photoshop不同的是,这样合成进去的人是动态且实时的. 简单的思路 BodyInde ...

  7. Java多线程之线程池

    现在是多核的时代,面向多核的编程很重要,因此基于java的并发和多线程开发非常重要. 线程池是于队列密切相关的,其中队列保存了所有等待执行的任务.工作者线程的任务很简单:从队列中获取一个任务,执行任务 ...

  8. Tarjan 离线算法LCA

    #include<map> #include<set> #include<cmath> #include<queue> #include<cstd ...

  9. 【转】对于移动APP测试的一个小技巧

    目标:目前越来越多的应用要支持移动设备,html5的推出,方便了页面对移动app的支持,那么我们该如何有效的去测试同时支持app和web的代码?web的测试可以使用浏览器的一些工具来辅助测试,比如ff ...

  10. C#的Process类的一些用法

    c#之process类相关整理 一.根据进程名获取进程的用户名? 需要添加对 System.Management.dll 的引用 using System.Diagnostics; using Sys ...