Configuration python CGI in XAMPP in win-7
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的更多相关文章
- Windows 配置 Apache Python CGI
提示:安装Apache可参考 https://jingyan.baidu.com/article/0eb457e53c019f03f1a905c7.html 1. 打开URL: https://ww ...
- Apache运行python cgi程序
Apache运行python cgi程序 环境 win10 x64 专业版 Apache2.4 python 2.7 Apache安装和配置 Apache服务器的安装请自行搜索.在Apache2.4中 ...
- Python CGI编程和CGIHTTPServer
Python2.7 的CGIHTTPServer 可以作为一个简单的HTTP服务器,能够调用cgi脚本 1 在任意目录下创建一个特殊的目录 cgi-bin ,用于存放自己写的脚本(.py或.cgi) ...
- Python CGI编程(转自易百)
Python CGI编程 Python的CGI编程,公共网关接口或CGI,Web服务器和一个自定义的脚本之间交换信息是一组定义的标准. 什么是CGI ? 公共网关接口或CGI,Web服务器和一 ...
- [Python]python CGI脚本在apache服务器上运行时出现“Premature end of script headers”错误
在测试自己的python CGI脚本时, 当html网页中的表单form内容传送到服务器python脚本时, 总是出现Premature end of script headers错误, 网页显示是服 ...
- 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 ...
- python CGI编程-----简单的本地使用(1)
本章节需要安装python开发工具,window平台安装地址:https://www.python.org/downloads/windows/,linux安装地址:https://www.pytho ...
- Common Gateway Interface Python CGI编程
https://en.wikipedia.org/wiki/Gateway_(telecommunications) In telecommunications, the term gateway r ...
- 彻底解决python cgi 编程出现的编码问题
Answering this for late-comers because I don't think that the posted answers get to the root of the ...
随机推荐
- IOS 给图片添加水印(文字)
有时候上传图片要加唯一标识,简单的就是添加一个水印.这里水印我们讲文字,可以是当前系统时间.坐标.地理位置等 原理就是把一个字符串写到图片上,并且字(font)的大小由图片大小控制. 以下是封装好的一 ...
- Java 多线程-上课总结
Java 多线程 一.操作系统中线程和进程的概念 现在的操作系统是多任务操作系统.多线程是实现多任务的一种方式. 进程是指一个内存中运行的应用程序,每个进程都有自己独立的一块内存空间,一个进程中可以启 ...
- centos7上源码安装mysql5.7.11
由于初学,安装这玩意搞了三天,其间各种报错难以解决,网上各种解答误导.最好的办法还是使用官方的英文文档,建议初学者一定要使用官方的文档,特别是下面两个页面作为初学者一定要细看: Installing ...
- 为Asp.Net Web Api添加Http基本认证
Asp.net Web Api提供了RESTFul web服务的编程接口.默认RESTFul 服务没有提供任何验证或者基于角色的验证,这显然不适合Put.Post.Delete这些操作.Aps.net ...
- BZOJ 2879: [Noi2012]美食节 最小费用流 动态添边
2879: [Noi2012]美食节 Time Limit: 10 Sec Memory Limit: 512 MBSubmit: 324 Solved: 179[Submit][Status] ...
- 初识 Asp.Net内置对象之Cookie对象
Cookie对象 Cookie对象用于保存客户端浏览器请求的服务器页面,也可用于存放非敏感性的用户信息,信息保存的时间可以根据用户的需要经行设置.并非所有的浏览器都支持Cookie,并非数据信息都是以 ...
- 学习Slim Framework for PHP v3 (七)--route middleware怎么被add进来的?
上两篇中分析了route是怎么被加进来的,以及如何被匹配的.这篇说一下route middleware是如何被加进来的,即add进来的.index.php的代码如下: $app->get('/f ...
- .NET DLL 保护措施应用实例(百度云批量保存工具)
最近做了个小工具,将保护措施思路全部应用到了此工具中. 点我下载 百度云批量保存工具是一款专门用于自动批量保存百度云分享的软件. 本软件特点:1:完全模拟人工操作:2:可以批量保存百度分享的文件( ...
- apache Internal Server Error 的几个问题
Internal Server Error The server encountered an internal error or misconfiguration and was unable to ...
- 百度编辑器ueditor代码高亮效果前台不显示的解决方法
原因是你没有在你的内容页加载相应的css文件,这要如何解决呢? 经测试,只要插入以下两个文件即可解决问题: <link href="你的ueditor路径/ueditor/third- ...