BigNoseBird.Com- Home Small Logo
The 508 Compliant Guide to 
       Big Nose Bird
BACK

NESTED Includes & Directives in
Server Side Includes!

I have often been asked if it is possible to place directives in a file that is being included in a parsed page. Everyone that trys it reports that the literal information contained in the file is merged into the resulting document. Here is the solution with an example.
<!--#include file="somefile.txt" -->

Above is the typical directive to include a text file in our page. For argument's sake, let's say that somefile.txt contains the following:

<!--#echo var="DATE_LOCAL" -->
When the merge happens, and you view the source code of the resulting page you see the directive- not the local date and time.
Here is the simple solution to the problem:
Modify the include directive in your web page so that it requests somefile.shtml

<!--#include file="somefile.shtml" -->

Then rename somefile.txt to somefile.shtml

That is all there is to it!
 


Find or Give Help on the BBS
 
Home Top E-Mail
If it looks great, it's by Christine
Some Fine Print
© 1997-2003 BigNoseBird.Com®, Inc. All rights reserved. All other trademarks are the sole property of their respective owners. The products that we recommend are only ones that we use. We have no relationship with any of the authors or their companies. We cannot assume responsibility for their ultimate performance or lack of same. We also cannot assume responsibility for either any programs provided here, or for any advice that is given since we have no control over what happens after our code or words leave this site. Always use prudent judgment in implementing any program- and always make a backup first! For further information, please read our Privacy Statement. We can be contacted at webmaster@bignosebird.com.


<reallybig.com>
Web Builder Network Portal
Advertise
on the
Reallybig.com
Network
BigNoseBird Newsletter
Subscribe
Un-Subscribe


Sign up today to receive our low volume newsletter. Tips, tricks, news, and whatever else crosses our minds.
Back Issues
Privacy Statement