CGI这里简单的说下,就是很多网站都需要输入验证码,而在Apache的环境下没有开启CGI的话,网站的验证码是无法正常显示的,这里给出的方法适用于Apache版本:2.0.63,在Windows平台上使用。
工具/原料
1
Apache
2
ActivePerl脚本解释器
方法/步骤
1
修改apache的配置文件httpd.conf:
2Perl ','\n';print '','\n';print '','\n';print '
编写perl脚本程序hello.pl#!C:\Perl\bin\perl.exe(注意:这是PERL的安装路径)print 'content-type: text/html','\n\n';print '','\n';print '
','\n';print 'Hello World
','\n';print '','\n';print '','\n';将程序拷贝到apache安装目录下cgi-bin文件夹下。3
启动Apache服务器进行测试本地IE中输入:http://127.0.0.1/cgi-bin/hello.pl出现 Hello Word 字样即可正常运行CGI。
上一篇:猪年吉祥简笔画步骤
下一篇:如何防静默安装,防悄悄安装