1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| #include <stdio.h>
| #include <stdlib.h>
|
| #include <fcgi_stdio.h>
| #include <fcgi_config.h>
|
|
| int main(void)
| {
|
| int fcgi_accept_status;
|
| while ((fcgi_accept_status = FCGI_Accept()) >= 0)
| {
|
| int count = 0;
| printf("Content-type: text/html\r\n"
| "\r\n"
| "<title>CGI Hello!</title>"
|
| "<h1>CGI Hello!</h1>"
| "Request number %d running on host <i>%s</i>\n",
| ++count, getenv("SERVER_NAME"));
|
| }
|
| return 0;
| }
|
|