This is an Apache question. Please read your Apache docs.
If you're willing to let the Perl code do the include
processing, however, you may wish to use HTML::Mason
or HTML::Template or some other such module.
-- Chip Salzenberg, Free-Floating Agent of Chaos | [reply] |
I think you're pretty much out of luck there.
I have done this trick in the past:
Create a SHTML file that includes your program.
Make sure all your <form> tags point to the SHTML file, and use GET.
<html>
....
<!--#include virtual="foo.cgi?${QUERY_STRING}" -->
....
</html>
This will ensure that you get the "wrapper" effect from the SHTML file, as well as form processing and/or dynamic output from your CGI program.
Enjoy!
--
Casey
I am a superhero.
| [reply] [d/l] |
In Apache 1.3.xx you cannot have stacked handlers. Either you have CGI handler, or you have SSI handler for some file. There is no (easy) way to pass output of CGI script throw SSI processor.
However there is exist module which can emulate SSI processing: CGI::SSI, . You can use it in your CGI scripts.
Another option is Apache 2.0.xx which supports stacked handlers.
Update: And another solution is running your scripts using mod_perl. There exist module Apache::SSIChain which can pass output of your script throw SSI processor (using some black magick I think :). Works only under mod_perl.
--
Ilya Martynov
(http://martynov.org/)
| [reply] |
I suddenly realized a very simple solution to my simple problem! the "require" command. I should have thought of this before. It's a hassle updating the output of all my CGIs, but if I just call for each CGI to include a list of variables containing my output paramaters, I only have to update one file to change all the CGIs, which was my premise on using SSI in the first place. So, if anyone else is still hunting for an answer, this was mine.
| [reply] |