emsApplication/applications/WebConfigure/example/cgiDemo/cgi-demo.cpp

16 lines
484 B
C++
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#include <stdio.h>
#include <cgic.h>
int cgiMain() {
char paramValue[256]; // 用于存储参数值的缓冲区
if (cgiFormString("paramName", paramValue, sizeof(paramValue)) == cgiFormSuccess) {
// 成功获取参数paramValue现在包含参数的值
// 在这里处理参数值...
} else {
// 获取参数失败,可能是因为参数不存在或发生了错误
// 在这里处理错误情况...
}
return 0;
}