Connecting Tech Pros Worldwide Help | Site Map

Perl CGI and Apache SSI

  #1  
Old November 27th, 2006, 09:31 AM
Newbie
 
Join Date: Nov 2006
Posts: 3
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:

Expand|Select|Wrap|Line Numbers
  1. use CGI::SSI_Parser;
  2.  
  3. fssi("./header.html");
  4.  
  5. sssi('<!--#include virtual="./header.html" -->');
  6.  
  #2  
Old November 27th, 2006, 06:47 PM
Member
 
Join Date: Nov 2006
Posts: 83

re: Perl CGI and Apache SSI


Why don't you just do:
Expand|Select|Wrap|Line Numbers
  1. open my $header, '<', './header.html' or die $!;
  2. print <$header>;
  #3  
Old November 28th, 2006, 09:53 PM
miller's Avatar
Moderator
 
Join Date: Oct 2006
Location: San Francisco, CA
Posts: 830

re: Perl CGI and Apache SSI


CGI::SSI_Parser is old and should be deprecated. Instead use CGI::SSI or Apache:SSI.
  #4  
Old November 29th, 2006, 10:50 AM
Newbie
 
Join Date: Nov 2006
Posts: 3

re: Perl CGI and Apache SSI


Well I'm using HTML::Template...
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with Apache setup parashar123 answers 22 January 28th, 2009 02:05 PM
Running cgi (or perl at all) in apache Kelicula answers 2 October 26th, 2007 05:51 PM
No CSS or PHP Includes showing on apache localhost site MaiyaHolliday answers 6 June 5th, 2007 09:36 PM
Combining SSI, PHP, and CGI in Apache 2.x Mxsmanic answers 27 July 17th, 2005 11:46 AM