Using powtils you can write something like the example bellow, which I
consider cleaner and easier to maintain:
From:
http://code.google.com/p/powtils/source/browse/dev#dev/examples/raw-template
program project1; {$IFDEF FPC}{$mode objfpc}{$H+}{$ENDIF} {$APPTYPE CONSOLE}
uses
pwinit, pwmain;
Try using powtils :
http://z505.com/powtils/idx.shtml
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Thats me up & running now - thanks for your help guys, I'll certainly poke
around those CGI vars.
On 19 May 2010 14:19, Carsten Bager wrote:
> > How do i get command line vars? i tried GetENV() but it didn't understand
> GetEnv() (which unit is
> > it in?)
>
>
> Here is a small cgi program. Comm
> How do i get command line vars? i tried GetENV() but it didn't understand
> GetEnv() (which unit is
> it in?)
Here is a small cgi program. Comments are in Danish but I hope you can get the
meaning.
Carsten
{Program version 1.00}
program listdir2html;
{LONGSTRINGS OFF}
{$INFO +-
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
eh - im pretty sure im using ARequest and not AResponse (im on differnt pc
just now, can't check) - but i'll definetly double check when i get back!
How do i get command line vars? i tried GetENV() but it didn't understand
GetEnv() (which unit is it in?)
Cheers.
On 19 May 2010 13:55, Graeme Geld
Vannus het geskryf:
> Can someone point me to how I can make a CGI app that outputs the fields in
> the query?
Think of CGI apps as simple Console applications (that's pretty much what
they are). Everything after the ? is simply passed in as a parameter to
your program. In it's simplest form you c
On Wed, 19 May 2010, Vannus wrote:
This may not be the right place to ask, but I'm really stumped and would
much prefer FPC over PHP.
Can someone point me to how I can make a CGI app that outputs the fields in
the query?
ie.
my.cgi?q=hello
and my.cgi then outputs whatever q is?
I'm using