cgi接口
//cgi接口定义
tCGI CGI_TAB[]={
{"/login.cgi", LOGIN_CGI_Handler},
{"/saveNet.cgi", SAVE_NET_Handler} /*这里的cginame要和网页表单里的action相同<form method='get' action='config.cgi'>*/
};
const char * SAVE_NET_Handler(int iIndex, int iNumParams, char *pcParam[], char *pcValue[])
{
uint32_t i=0;
for (i=0; i<iNumParams/*参数数量*/; i++)
{
if(strcmp(pcParam[i]/*参数名字,与网页里控件的name相同name='ip'*/,"ip") == 0) //设备ip
{
printf("ip is : %s \r\n",pcValue[i]/*控件的值*/);
}
else if(strcmp(pcParam[i],"port") == 0)
{
...
}
......
}
cgi和ssi大概就这些内容要改 |