SPUG: SSI exec command in HTML w/arguments
andy at n2h2.com
Tue Jan 18 00:23:15 CST 2000
On Jan 17, 2000 @ 9:38pm, Joe Devlin wrote:
> Where do I look to find the syntax for the HTML
> <!--#exec cgi="my.pl args="arg1 arg2 arg3"-->
> that is accepted by my server. The server will not
> always be the same depending on who I am
> writing code for.
Well, that would depend a lot on the specific server and its particular
SSI module. The HTML is actually an HTML comment that has special meaning
to the server or server module responsible for the SSI feature.
If you were using Apache and its SSI (mod_include), I'd suggest starting
with the module documentation at apache.org:
Otherwise, consult the documentation for the server in question.
> I especially want to be able to pass arguments
> to my CGI script.
CGI scripts usually do not take arguments in the traditional sense of
command line arguments (right?). CGI's take input from the CGI interface
(an URL query or POST method input, i.e. stdin).
Also, a mod_include (SSI) #exec method can be used to run any arbitrary
executable on the server host (e.g., /bin/date). It's not meant to set up
the CGI environment expected by a CGI script (a la CGI.pm or whathaveyou).
RTFM for specifics.
Don't mix application logic and presentation. You'll just get into
a world of hurt. Yeah, sure. Sometimes you're forced to by powers
beyond your control, but it really isn't worth mixing them. Code
inside HTML or HTML inside code: they both suck except for the
most simple applications (and what application doesn't become more
complicated with time).
Andrew Sweger <andy at n2h2.com> | N2H2, Incorporated
v=206.336.2947 f=206.336.1541 | 900 Fourth Avenue, Suite 3400
Advanced Technologies | Seattle WA 98164-1059
Development | http://www.n2h2.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
Email to majordomo at pm.org: ACTION spug-list your_address
More information about the spug-list