请问什么是cgi呀?cgi有什么用呀?和jsp比哪个好呀?那个叫Apache的服务器如何支持cgi呀?还有能不能帮我写一个最简单的cgi让我看看效果呀?
问题点数:20、回复次数:6Top
1 楼karma(无为MS MVP)回复于 2002-02-03 02:51:10 得分 15
cgi = common gateway interface 定义了网络服务器与可执行编码之间的接口
CGI程序是用来处理表单及生成动态网页的,但有一个缺点,跟JAVA SERVLET一样,就是,HTML编码是包含在程序编码之中的,所以修改起来比较麻烦
JSP则倒过来,程序编码是包含HTML编码之中的,这是进步
Apache的服务器支持cgi,你需要做一下设置
一般是用Perl来写CGI,当然,你也可以用C/C++,Python, Tcl等语言来写CGI
here is an example in Perl:
print "Content-Type:text/html\n\n";
print "<html><body>hello world</body></html>";
Top
2 楼panjet()回复于 2002-02-03 03:03:48 得分 0
谢谢karma(无为)!这么晚了还不去睡?要注意保重身体呀!Top
3 楼qqjp(qq)回复于 2002-02-03 03:08:27 得分 5
CGI is a kind of Server side programming. It runs on the server, not on the client.
CGI = Perl language. JSP is developed by Sun Micro. Which one is better? That depends on your project as architecture of J2EE - JSP, servlet, EJB are very powerful on e-commerce.
Apache supports CGI as it was built-in already.
Top
4 楼panjet()回复于 2002-02-03 03:11:03 得分 0
另外请告诉我几个介绍cgi技术的入门网站好吗?Top
5 楼karma(无为MS MVP)回复于 2002-02-03 03:18:06 得分 0
http://member.netease.com/~elvis/
http://www.cgi101.com/
Top
6 楼panjet()回复于 2002-02-03 04:26:00 得分 0
谢谢karma(无为),以后还请多多关照呀!Top




