You have to fill the hole you stepped on yourself, don’t blame others.
I’m just a fool. I don’t even know how to use gcc, so I dare to use g++. Well, it took me two days to solve such a simple problem. Fortunately, there are not many demands, so you can try it. The above code:
#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; }
You don’t understand the world of C++! ! !
On what is proficient in C++? !
Today’s 3V3 basketball game, we won!
Come on!
The above has introduced the 2016-6-21 Miscellaneous Feelings, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.