你可以使用CGIC,(www.yahoo.com搜索即可)
自己组织CGI也很容易,市上有很多CGI编程书都谈到了C编写CGI.
最好的例子是广泛使用的wwwcounter.
可到software.silversand.net下载
#include <stdio.h>
#include <iostream.h>
#include <string>
void main(int argc,char ** argv,char ** arge)
{
string str;
cin >> str;
cout << "content-type:text/html\r\n\r\n";
cout << "abc\r\n<br>";
while ((arge)++,*arge!=NULL){
cout << *arge << "<BR>";
}
#include <stdlib.h>
#include <stdio.h>
#include <iostream.h>
#include <string>
void main(int argc,char ** argv,char ** arge)
{
char *lpszQeuryString;
cout << "Content-Type: text/html\n\n";
cout << "Hello World<BR>\n";
lpszQeuryString = getenv( "QUERY_STRING" );
if (lpszQeuryString==NULL) lpszQeuryString="";
cout << "Your input in URL is: ";
cout << lpszQeuryString;
return;
}
请问各位大虾,你们在UNIX下用C语言写过CGI程序并调试通过了吗?