in reply to include statement in perl?
This is not specific to CGI.pm
Taint mode will require that you set $ENV{'DOCUMENT_ROOT'} for yourself.sub include { my $file = shift; open my $fh, '<', $ENV{'DOCUMENT_ROOT'}.$file or return; while (<$fh>) { print } close $fh or return; return 1; }
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: include statement in perl? (DOCUMENT_ROOT trustworthy)
by Aristotle (Chancellor) on May 31, 2003 at 03:15 UTC | |
by Beatnik (Parson) on May 31, 2003 at 13:35 UTC | |
by Aristotle (Chancellor) on May 31, 2003 at 13:38 UTC | |
|
Re: Re: include statement in perl?
by stonecolddevin (Parson) on May 31, 2003 at 03:42 UTC |