Web Design, Development & Marketing

Web Development Articles

Relative File (Virtual) Inclusion - Server Side Includes (SSI)

This post expands upon the post made a while back on Server Side Includes (SSI) and .shtml Pages. I was recently tinkering with SSI and was attempting to include an HTML file located in the parent directory of a certain SHTML file. Using <!--#include file="../file.html"--> does not work for this. The following code which uses the "virtual" argument must be used instead:

<!--#include virtual="../file.html" -->

The virtual argument can also be used in any situation where the file you are including is located in a position requiring an address starting at the server root.

<!--#include virtual="/directory/included.html" -->

Subscribe to RSS Feed Bookmark and Share

Related Links

Related Articles / Posts

Barclaycard ePDQ CPI Integrations (27/05/2009)

HSBC XML API / CPI E-commerce Integrations (02/04/2009)

Controlling PHP Register Globals Using .htaccess File (04/03/2008)

Relative File (Virtual) Inclusion - Server Side Includes (SSI) (23/03/2007)

Apache: Running XAMPP Server Software for Testing PHP and MySQL (14/08/2006)