Which < ?php> include did I want?

This is used on .shtml pages within the same directory:
< !--#include file="file_name.php" -->
This is used on .php pages within the same directory:
< ?php include("file_name.php"); ?>This is used on .shtml pages to call a file in another directory:
< !--#include virtual="file_name.php" -->
typically it would look like this:
< !--#include virtual="/another_directory/file_name.php"-->If your regular pages end in .shtml, I would suggest using
< !--#include virtual="/another_directory/file_name.php"-->
and putting files like your header, footer, and navigation in that directory. It makes for easy maintenance down the road.

If you regular pages end in .php, I would suggest using
< ?php virtual ("/another_directory/file_name.php"); ?>
for the same reason.

I would like to thank NatureBoy from ABW for sorting that out!

Leave a Reply