Changing test with serverside includes

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I tried serverside includes to try and alter some text on a web page
I'm authoring, with the below:

<!--#config timefmt="%j" -->
<P CLASS="motd centre">
<!--#if expr="\"$DATE_GMT\" < 10" -->
We hope you have had a Merry Christmas and Happy New Year.<!--#endif
<!--#if expr="\"$DATE_GMT\"  < 69" -->
We open for the year on March 10th
<!--#else -->
We are now open for the year
<!--#endif -->
 and look forward to welcoming you during the season. Easter and May
Day weekends are filling up, so
<!--#if expr="\"$DOCUMENT_NAME\" = \"bookenq.html\"" -->book now
<!--#else --><A HREF="/bookenq.html" TITLE="Online booking form">book
now</A><!--#endif --> to avoid disappointment.</P>
to basically change from "we're closed" to "we're open" on the
appropriate day (I'm going to be away from net access in a authoring
mode for a while)

This goes into a page like as the "message
of the day" (below the first photo), so it's all HTML 4.01 compliant
etc. But the message thus far has not lost the "Merry Christmas" part.
Is it possible to change text this way, or am I clutching at straws?

Many thanks


Re: Changing test with serverside includes wrote:
Quoted text here. Click to load it

Except for one-line includes (e.g., last date updated), I put everything
into separate script files.  I use Korn-shell UNIX.  The HTML and
content that I want to insert into my Web pages are then provided from
the script files by PRINT statements in the following format:
   print 'Content-type: text/html'
   print ''
   print xxx
where the "xxx" is the desired output.  The first two lines signal the
Web server to include whatever print statements follow them.

It helps that my ISP allows me to access my account on their Web server
via a secure Telnet session so that I can test my UNIX script files.

David E. Ross
Climate:  California Mediterranean
Sunset Zone: 21 -- interior Santa Monica Mountains with some ocean
influence (USDA 10a, very close to Sunset Zone 19)
Gardening pages at <

Site Timeline