Hi,
I have the following really simple code:
[tt]
#include <iostream.h>
int main(int argc, char * argv[]) {
int count;
cout << "Content-type: text/plain" << endl << endl;
for (count = 0; count <= (argc - 1); count++) {
cout << argv[count] << endl;
}
return(0);
}
[/tt]
that just prints out an argument list. It works fine on the command line, and if I address it in a web browser:
it outputs:
[tt]
program
test
[/tt]
but when I do:
it just outputs:
[tt]
program
[/tt]
How do I get parameter/value pairs when calling a c++ program as a cgi?
Thanks
Will.
fortytwo
will@hellacool.co.uk
I have the following really simple code:
[tt]
#include <iostream.h>
int main(int argc, char * argv[]) {
int count;
cout << "Content-type: text/plain" << endl << endl;
for (count = 0; count <= (argc - 1); count++) {
cout << argv[count] << endl;
}
return(0);
}
[/tt]
that just prints out an argument list. It works fine on the command line, and if I address it in a web browser:
it outputs:
[tt]
program
test
[/tt]
but when I do:
it just outputs:
[tt]
program
[/tt]
How do I get parameter/value pairs when calling a c++ program as a cgi?
Thanks
Will.
fortytwo
will@hellacool.co.uk