打印

以太网例程中的web网页创建代码看不懂!求高手指点!

[复制链接]
333|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
电子学长|  楼主 | 2018-7-3 16:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
主要是这一段:if (strncmp("GET ",(char *)&(buf[dat_p]),4)!=0)              {
                  // head, post and other methods:
                  //
                  // for possible status codes see:
                  // http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
                  plen=fill_tcp_data_p(buf,0,PSTR("HTTP/1.0 200 OK
Content-Type: text/html

<h1>200 OK</h1>"));//这个创建网页不懂
                  goto SENDTCP;
              }
              if (strncmp("/ ",(char *)&(buf[dat_p+4]),2)==0)
              {
                  plen=fill_tcp_data_p(buf,0,PSTR("HTTP/1.0 200 OK
Content-Type: text/html

"));
                  plen=fill_tcp_data_p(buf,plen,PSTR("<p>Usage: "));
                  plen=fill_tcp_data(buf,plen,baseurl);
                  plen=fill_tcp_data_p(buf,plen,PSTR("password</p>"));
                  goto SENDTCP;
              }
              cmd=analyse_get_url((char *)&(buf[dat_p+5]));

求帮忙解析一下。

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

424

主题

447

帖子

1

粉丝