Aug 14, 2002, 2:58 PM
If the point was whether <!--#include file="/blah.txt"--> can be used in a cgi script, then yes, I've completely missed the point.
Re: [RedRum] Replace Text in HTML Template
If the point was having files included into a cgi file, using date formats and echoing some variables, then I don't believe I missed the point. It's the big picture I'm concerned with, not necessarily the technical details.
True, SSI won't work in scripts, but the problem at hand was running SSI commands. It's pedantic to not consider readily available alternatives which will yield the same result. Whether or not it fakes SSI or really is SSI isn't the issue. The issue is what needs to be done, not how it is done.
The short, easy and technically correct answer is no, you can't use <!--#include file="/blah.txt"--> -- SSI doesn't work in cgi scripts, period -- (no alternatives offered). This doesn't help to solve the problem.
The longer and more helpful answer is no, you can't use <!--#include file="/blah.txt"-->, but you can use [ davorg ]'s suggestion earlier in this thread or a module that'll fake it and still do what needs to be done without having to duplicate the contents of your included files or write other code to emulate your SSI calls.
He needed this to be done:
<!--#include file="topbar.txt" -->
<!--#include file="sidebar.txt" -->
<!--#include file="bottomnav.txt" -->
©<!--#config timefmt="%Y" --><!--#echo var="DATE_LOCAL"-->
This can be done from within his program with:
print $ssi->include(file=> 'topbar.txt') .
$ssi->include(file=> 'sidebar.txt') .
$ssi->include(file=> 'bottomnav.txt') .
$ssi->config('timefmt', '%Y') .
It may be a workaround that mimics SSI, but it sure looks like a solution.
Update: Fixed typo.
(This post was edited by Jasmine on Aug 14, 2002, 5:08 PM)