A server-side include is a coding that you can include within your HTML document that will tell the web server to include other information with the document being served.
Server side includes are a handy way to include information on your pages automatically. For example, you can use an #INCLUDE statement to display the header and footer of your pages automatically and make sure that each page displays the same information. You can save time by using a single header.html or footer.html file if this information changes. You can also use server side includes for graphics such as logos or image maps that should appear on multiple pages.
You will need to use the .shtml extension for pages using the server side include (those that have #INCLUDE statements) for accounts hosted on Webserve. The file that is being included can have other extensions, such as .html.
Please note that for security reasons, the EXEC server side include is NOT enabled on Webserve. The EXEC command is often used to run a cgi or perl program from a web page, but this function is not enabled on Webserve.
Using Server Side Includes with files in the same directory
To use a server side include, use the #include statement. This command tells the server to include another file, and tells it the file name that should be included:
<!--#include FILE="filename.html"-->
This page uses server side includes to display the Webmaster banner and header information. An example of the command used is:
<!--#include file="header.html" -->
In this example it is placed in the body of the document, immediately after the <BODY> tag. One thing about SSI includes is the process of including. It takes two separate files and creates one whole file. What the server does is actually to take the SSI page and physically inserted it into the page calling it.
Server side includes are a handy way to include information on your pages automatically. For example, you can use an #INCLUDE statement to display the header and footer of your pages automatically and make sure that each page displays the same information. You can save time by using a single header.html or footer.html file if this information changes. You can also use server side includes for graphics such as logos or image maps that should appear on multiple pages.
You will need to use the .shtml extension for pages using the server side include (those that have #INCLUDE statements) for accounts hosted on Webserve. The file that is being included can have other extensions, such as .html.
Please note that for security reasons, the EXEC server side include is NOT enabled on Webserve. The EXEC command is often used to run a cgi or perl program from a web page, but this function is not enabled on Webserve.
Using Server Side Includes with files in the same directory
To use a server side include, use the #include statement. This command tells the server to include another file, and tells it the file name that should be included:
<!--#include FILE="filename.html"-->
This page uses server side includes to display the Webmaster banner and header information. An example of the command used is:
<!--#include file="header.html" -->
In this example it is placed in the body of the document, immediately after the <BODY> tag. One thing about SSI includes is the process of including. It takes two separate files and creates one whole file. What the server does is actually to take the SSI page and physically inserted it into the page calling it.