[Xitami] Another Try, (little different approach), -
Ron Ackerman
xitami@lists.xitami.org
Wed, 4 May 2005 09:57:04 -0400
~It's been awhile since I've done any SSI, but I remember I had to call my
pages shtml or shtm.
I do know that for includes to work such as: <!--#include
virtual="sitefoot.txt"--> it is going to
look for the file you are including in the main web page directory of your
server (i.e.
/webpages) and it will not show if you place the file within a subdirectory
of /webpages where
you may have your template.html file.
If you want to include a .txt file within a scipt what I use is:
sub include {
# --------------------------------------------------------
# This is text to include. Use like an SSI.
my $file = shift;
open (FILE, "<$file") or die "Can't open $file ($!)";
print <FILE>;
close FILE;
}
## Then add this line wherever you want file included:
|;
&include ("dbside.txt");
print qq|
I use this for many scripts to include a footer and side menu within my
displays. Especially
for hosts sites which don't always allow SSI.
Hope this help :)
Lois
=================
On 3 May 2005 at 19:22, tom buckley wrote:
> At a glance, mine is surely not the dumbest question ever asked
> here, so
> i'm going to try this again since I've fought with it for this darn
> long now!
>
> It has got to be something I'm doing 'or not doing' here, because I
> know
> there is 'a way' to make an "include" work on my server, either with
> or without ssi.. Testing as free script that uses a template.html
> page with " <!--content--> " as it's only place-holder for the
> index.cgi page of the script, I have tried it both inside and outside
> of the cgi-bin, and with every possible cfg and place-holder I can
> think of, but I still cannot "include" the file! Someone "please"
> steer me in the right direction here to make this work! Anything that
> anyone can tell me to try, to include a file in another, I will
> certainly give it a shot! Thanks ANYONE! harthon
>
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 05/03/2005