Re: How can I write a cgi using c/c++?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/07/07, ying lcs <yinglcs@xxxxxxxxx> wrote:
Can you please tell me what is the easiest way to write a cgi using c/c++?
I am coming from Tomcat servlet environment,  I would like to know how
can I do a cgi using c/c++ in apache?

C:

#include <stdio.h>
int main (void)
{
 printf("Content-Type: text/html\n\n");
 printf("Hello, world"):
 return 0;
}

C++:

#include <iostream>
int main (void)
{
 cout << "Content-Type: text/html\n\n";
 cout << "Hello, world";
 return 0;
}

Is that what you meant, or do you have a meaningful question? The
point is, there's no difference in CGI writing in any particular
language, you just have to know how to interogate the environment
variables, stdin & stdout.

http://hoohoo.ncsa.uiuc.edu/cgi/

--
noodl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux