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