码迷,mamicode.com
首页 > Web开发 > 详细

cgi与html

时间:2014-07-22 22:55:33      阅读:518      评论:0      收藏:0      [点我收藏+]

标签:strong   io   for   cti   re   c   

html中调用cgi。<form action="/cgi-bin/mult.cgi" method="get" target="_blank">

html中调用html:

<frameset rows="120,*" cols="*" frameborder="no" border="0" framespacing="0">
<frame src="tou.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />

cgi中调用html

if( (strcmp(name,"root")+1) && (strcmp(pass,"password")+1) )
printf("<a href=\"../first.html\" target=\"mainFrame\">%s</a>",name);

cgi接受html信息:

date = getenv("QUERY_STRING");
if(date == NULL)
printf("<h1>no word input cgi<h1>");
if(sscanf(date,"fname=%[^&]&lname=%s",&name,&pass)!=2)
printf("<p>you input is wrong</p>");

cgi与html,布布扣,bubuko.com

cgi与html

标签:strong   io   for   cti   re   c   

原文地址:http://www.cnblogs.com/zhouhbing/p/3848934.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!