SSI's and script, was Need Scripts Parsed - Clarification
by Frank Boumphrey <bckman(at)ix.netcom.com>
|
| Date: |
Wed, 10 Apr 2002 23:03:16 -0400 |
| To: |
hwg-techniques(at)hwg.org, Christie Cooksey <christie(at)thearmidalemall.com> |
| References: |
cooksey |
| |
todo: View
Thread,
Original
|
|
Ah! now I get it (I think). Remember that includes are the first thing added
to a page, before any script is run. If your (client side) script writes the
include, it is already too late.
Same on the server side. Both Server side JavaScript, ASP and Perl use SSI
notation. If you run a page, the first thing it does is go off to the
'include' engine, the second thing is run your server side scripts, then it
will send your html stream. IOW SSI's won't work in an if statement or any
where else in these scripts.
However, if you use PHP the include is run by the script, because
'include()' is a function in PHP, so the script runs before the innclusions
take place. So if you absolutely must include stuff with serve side script,
use PHP.
I'm not sure about JSP, perhaps someone can enlighten us!
Frank
----- Original Message -----
From: "Christie Cooksey" <christie(at)thearmidalemall.com>
To: "Frank Boumphrey" <bckman(at)ix.netcom.com>
Sent: Wednesday, April 10, 2002 9:51 PM
Subject: Re: Need Scripts Parsed - Clarification
> ----- Original Message -----
> > your server has to be set up to recognise a page that has 'includes' in
> it,
> > inother words it must send '*.shtml* page to an engine which parses
> include
> > statements. You will need to speak to you SysAdmin. In Apache he can
> simply
> > activate a module, and then your pages will work fine. I think it's just
> as
> > simple in IIS. If you are on IIS try using the .asp suffix, and again
your
> > includes should work.
> ----------------------------
>
> Already got that. Even added a .htaccess file to tell it to parse .html
as
> well.
>
> I just don't get why it won't work for pages created on the fly by my
> scripts.
>
> Cheers
> Christie :0)
>
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.