在html文件设计时采用什么命令启动cgi程序

html-css012

在html文件设计时采用什么命令启动cgi程序,第1张

在HML文件设计时采用什么命令来启动CGI程序+(分数:2您好亲,1、Web服务器通过调用CGI程序实现和Web浏览器的交互,也就是CGI程序接受Web浏览器发送给Web服务器的信息,进行处理,将响应结果再回送给Web服务器及Web浏览器。CGI程序一般完成Web网页中表单(Form)数据的处理、数据库查询和实现与传统应用系统的集成等工作。CGI程序可以用任何程序设计语言编写,如Shell脚本语言、Perl、Fortran、Pascal、C语言等。但是用C语言编写的CGI程序具有执行速度快、安全性高(因为C语言程序是编译执行且不可被修改)等特点。CGI接口标准包括标准输入、环境变量、标准输出三部分

# include <stdio.h>

# include <stdlib.h>

int main()

{

char *data

long m,n

printf("Content-Type:text/html \r\n\r\n")

printf("<html><head>\n")

printf("<title>hello world </title>\n")

printf("</head>\n")

printf("<body>\n")

printf("<h1>hello world </h1>\n")

data = getenv("QUERY_STRING")

if(sscanf(data,"m=%ld&n=%ld",&m,&n)!=2)

printf("<P >错误!输入数据非法。表单中输入的必须是数字。</p>")

else

printf("<P >%ld和%ld的成绩是:%ld。",m,n,m*n)

printf("</body></html>\n")

return 0

}

js是客户端编程语言

html是客户端标记性语言,是所有网页的基础

php、cgi是服务器端脚本

Dreamweaver是一个编辑器,可以编写js、php、html等网页文件

至于要用什么,这个问题问得太笼统