in reply to Passing variables to an SSI script

You can use the first method only
<!--#exec cmd="cgi-bin/date.cgi --style=5"-->
That should work. Perhaps if you show more of your code, someone will be able to help.

Greetings,

--
tune

Replies are listed 'Best First'.
Re: Re: Passing variables to an SSI script
by c (Hermit) on Nov 27, 2001 at 04:06 UTC
    Using <!--#exec cmd="cgi-bin/date.cgi --style=2"--> ends up being parsed, but with no output. My code snippet is:

    #!/usr/bin/perl -w use strict; use POSIX qw(strftime); use Getopt::Long; ## taint environmentals delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; $ENV{'PATH'} = "/usr/local/jail"; ## set up opts my $style = "1"; GetOptions ( 'style=s' => \$style, ); ## select style of date representation my $date; ## November 26, 2001 if ($style == "1") { $date = strftime("%B %e, %Y", localtime); ## 26 November 2001 } elsif ($style == "2") { $date = strftime("%e %B %Y", localtime); } print "Content-type: text/html\n\n"; print "$date\n";

    humbly -c