Perl CGI and Apache SSI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bcochofel
    New Member
    • Nov 2006
    • 3

    Perl CGI and Apache SSI

    Hi, I have an index.html that includes files using the include directive from Apache mod_include. I have an header, menu and footer.

    What I want is to be able to include this files in a perl cgi script.

    How can I do this?

    I was trying CGI::SSI_Parser and using fssi($filename) but no good...

    I've tried:

    Code:
    use CGI::SSI_Parser;
    
    fssi("./header.html");
    
    sssi('<!--#include virtual="./header.html" -->');
  • GunnarH
    New Member
    • Nov 2006
    • 83

    #2
    Why don't you just do:
    Code:
    open my $header, '<', './header.html' or die $!;
    print <$header>;

    Comment

    • miller
      Recognized Expert Top Contributor
      • Oct 2006
      • 1086

      #3
      CGI::SSI_Parser is old and should be deprecated. Instead use CGI::SSI or Apache:SSI.

      Comment

      • bcochofel
        New Member
        • Nov 2006
        • 3

        #4
        Well I'm using HTML::Template. ..

        Comment

        Working...