[fpc-pascal] CGI application

Graeme Geldenhuys graemeg.lists at gmail.com
Wed May 19 15:09:39 CEST 2010


Vannus het geskryf:
> 
> How do i get command line vars? i tried GetENV() but it didn't understand
> GetEnv() (which unit is it in?)

ParamCount() and ParamStr() is part of the System unit, so is always available.


GetEnvironmentVariable() is in the SysUtils unit.

Note that CGI apps use a lot of environment variables as well, so it might
be beneficial if you loop through all of them and print them out so you can
see what is available to you. I'm pretty sure Apache also comes with a
sample CGI app which does this. Values stored are things like document root
directory, server name, cgi application name etc..


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/




More information about the fpc-pascal mailing list