Thanks. That is what I am looking for. How can I put your test program
running in apache and how can I invoke that via my browser?
Thanks again.
On 7/10/07, Vincent Bray <[EMAIL PROTECTED]> wrote:
On 10/07/07, ying lcs <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]