[Xitami] Another Try, (little different approach), -

Lois Robinson xitami@lists.xitami.org
Tue, 03 May 2005 16:46:38 -0700


I do know that for includes to work such as:  <!--#include virtual=3D"site=
foot.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 subdirector=
y 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 =3D 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 di=
splays.   Especially 
for hosts sites which don't always allow SSI.

Hope this help :)

Lois
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D



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
> 
> _________________________________________________________________ Is
> your PC infected? Get a FREE online computer virus scan from McAfee=AE
> Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3D3963
> 
> 
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
>