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.
Printable View
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.