搭建简易的c语言与python语言CGI和Apache服务器的开发环境

搭建简易的c语言CGI和Apache服务器的开发环境

http://www.cnblogs.com/tt-0411/archive/2011/11/21/2257203.html

python配置apache的web服务器方法(python的CGI配置)

http://www.cnblogs.com/zhidong123/p/6491938.html?utm_source=itdadao&utm_medium=referral

Nginx + CGI/FastCGI + C/Cpp
http://www.cnblogs.com/skynet/p/4173450.html

解决python中文 乱码问题

在客户端utf-8显示为乱码

在中文网页请中依情况在标签中添加:

GB2312 (简体中文):

print ("Content-type:text/html;charset="gb2312"\n\n")

< META http-equiv=”Content-Type” content=”text/html; charset=gb2312″ />

#!D:\Program Files\Python\Python36\python.exe
# -*- coding: utf-8 -*-
print ("Content-type:text/html;\n\n")
print  ("")                             # 空行,告诉服务器结束头部
print ('<html>')
print ('<head>')
print ('<meta charset="gb2312">')
print ('<title>Hello Word - 我的第一个 CGI 程序!</title>')
print ('</head>')
print ('<body>')
print ('<h2>Hello Word! 我是CGI程序</h2>')
print ('</body>')
print ('</html>')

httpd.conf 中的核心配置

<Directory "D:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin">
    AllowOverride None
   # Options None
Options Indexes FollowSymLinks ExecCGI
   # Require all granted
</Directory>
AddHandler cgi-script .exe .pl .cgi .py

转载于:https://www.cnblogs.com/ioveNature/p/7351232.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值