Subj : Partially fixed...
To : Sean Dennis
From : Michael Preslar
Date : Tue Nov 15 2005 12:33 pm
Re: Partially fixed...
By: Sean Dennis to All on Mon Nov 14 2005 03:43 pm
> I have another question: this CGI reads in a config file. However, I can't
> figure out how to get the CGI to read the file without hardcoding the locati
> into the actual program itself. I don't want to pass this on the command li
> when the CGI is called. Does anyone know a way around this?
Try
var s:string;
s := getenv('SCRIPT_FILENAME');
{$ifdef FORNIX<curly bracket. my telnet client doesnt like em>
while s[length(s) <> '/' do delete(s,length(s),1);
{else<curly>
while s[length(s) <> '\' do delete(s,length(s),1);
{$endif<curly>
s := s + 'config.cfg';
Email me and Ill show you a cgi that shows all of the useful environment
variables available to cgis.
--- SBBSecho 2.10-Win32
* Origin: mount_z.synchro.net - Home of Lord/* (1:275/112)