开始FastCGI

开始linux+lighttpd+fastcgi的相关工作了。网上这方面的内容很少,只有官方网站www.fastcgi.com上的内容比较多一点。

下面是一个sample:

  #include <fcgi_stdio.h>
  #include 
<stdlib.h>
  #include 
<unistd.h>

int main ()
{
    
int counter=0;

    
while (FCGI_Accept() >= 0)
    
{
        printf(
"Content-type: text/html/n/n");
        printf(
"counter is %d.<br>", counter++);
    }


    
return 0;
}

posted on 2008-05-21 16:38  如果蜗牛有爱情  阅读(99)  评论(0编辑  收藏  举报

导航