[fpc-pascal]Re: CGI-program parameters
Lindy at jak.ppke.hu
Mon Jan 22 09:00:30 CET 2001
> I'm writing a small cgi-program using version 1.0.2 and have a
> question. My program is called from (Apache) html-page f.eks.
> like this (platform is Linux, Red Hat 6.2):
> <img src="my.cgi?var1=value1&var2=value2">
> then ParamStr( 1 ) in my program is blank!
> If I change to:
> <img scr="my.cgi?var1_value1&var2_value2">
> then ParamStr(1) = var1_value1\&var2_value2
> (note the backslash - is that to be expected?).
> Main "problem"(?) is: Using equal signs (=) in html call seems
> to destroy program parameter. Is this a bug or am I doing some-
> thing wrong?
> Thanks for any suggestion! ;-)
The requested parameter is in enviroments.
I have a CGI program which runs under Win/Linux with apache.
It use GetEnv('QUERY_STRING').
The Internet servers communicate with your programs over the
environment string and the standard I/O.
Try to get all of environment strings and read from strandard I/O
(with read(c); where c is a character) for GetEnv('Content_Length)
times, and write it out to the file. That is not so diffucult to
understand the environments names.
More information about the fpc-pascal