自己踩出来的坑,自己填喽,怪不得别人。
就傻叉一个,连gcc都没用好,就敢上g++,得,一个这么简单的问题,搞了两天,还好需求不多,让你能去尝试。上代码:
#include <stdlib.h>
#include <string.h>
#include "fcgi_stdio.h"
#include "fcgiapp.h"
int main(int argc,char *argv[])
{
int count = 0;
int i, scale;
char* pathInfo;
FCGX_Stream *in, *out, *err;
FCGX_ParamArray envp;
while (FCGX_Accept(&in, &out, &err, &envp) >= 0)
{
const char * query_string = FCGX_GetParam("QUERY_STRING", envp);
FCGX_FPrintF(out,"Content-type: text/html\r\n" \
"\r\n" \
"<html>" \
"<head><title>test</title> </head><body><p> %s",query_string);
char**temp = envp;
while((*temp)!=NULL)
{
FCGX_FPrintF(out,"%s\r\n",*temp);
temp++;
}
}
return 0;
}
你说你就乖乖用gcc编就好了,非要用g++编译,哈哈~嗨皮了
C++的世界你不懂!!!
论什么是精通C++?!
今天3V3篮球赛,赢了!
加油!