can someone explain to me how setenv() and getenv() work if one is executing a cgi file within a C file. [how setenv is modified/passed to the cgi file] Thanks.
can someone explain to me how setenv() and getenv() work if one is executing a cgi file within a C file. [how setenv is modified/passed to the cgi file] Thanks.
Have a look here:
Apache Environmental Variables
I think you mean script, not "cgi file". Whether that script uses QUERY_STRING depends on how it was written, in what language, and using what libraries. Eg, perl's CGI module does, but if you write a cgi script without such a library (which is easy, you just use stdin and stdout), then you would have to use a getenv() type function if you wanted to use QUERY_STRING instead of stdin.
I also believe you must use POST in your form/http request to use QUERY_STRING.
Last edited by MK27; 04-01-2010 at 10:17 AM.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge