perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ellers <>
Subject Re: Including CGI's
Date Wed, 05 Jun 2002 09:27:09 GMT

What you've got there is prob what I'd do for getting it to run...

although I'd probably add a parameter to the cgi script so it skipped the content-type stuff
(thereby stopping you from having to strip it)

But I can't help but wonder if there is some other way...

Could you make the functions in the cgi script (presuming it is perl) in the global.asa and
then just run the funcs?



6/5/02 4:36:25 PM, "Ian Cass" <> wrote:

>Bit of a puzzler here. What would be the correct way of running a CGI and
>have its output embedded on an Apache::ASP page?
>The site I'm working on has no frames & uses headers and footers to provide
>formatting. What I want to be able to do is to print my headers, the output
>from the generic CGI, then print my footer. Obviously, a redirect wont work
>here & an include will not execute the cgi. I need an 'exec and include
>output' command.
>I've come up with a horrible .asp wrapper hack for now that works for me,
>but I'm convinced there must be a 'proper' way of doing this.
>#!/usr/local/bin/perl asp
>my $me = basename($0);
>$me =~ s/\.asp//;
>my $content = `env "$ENV{'QUERY_STRING'}" ./$me.cgi`;
>$content =~ s/Content-type:.*\n//;
>$content =~ s/<html>//;
>$content =~ s/<\/html>//;
>$content =~ s/<body[^>]*>//;
>$content =~ s/<\/body>//;
>print $content;
> %>
>Ian Cass
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message