Using SSI (server side includes)By using SSI you are able to make site-wide changes by simply changing your include file. How? Here is an explaination of what these different methods are, and how to implement them. Three different methods of using SSI - standard, PHP, and ASP Cut the lines out of your html file that make up what will be used as an "include", and paste them into a new file. The new file should be comprised of only of the cut and pasted code; delete any extras in the new document that your html editor might automatically add like body or head tags. Let's say you cut out all the navigation code and made a new file containing this information. Name the new file something like: "nav.htm" In your original HTML file place this line were the original navigation code once appeared: <!--#include virtual="/nav.htm" --> Make sure the "nav.htm" actually points to were your include file is located. The above example would signify that "nav.htm" is in the root directory of your site. If you place your include files in a different location on your server, make sure you change the above code appropriatly.
Using PHP Includes:Follow the same steps as above, except that this is what will replace the lines of code that make up the include: < ?php *To use PHP includes, you will need to name or rename your pages to .php. IE: index.php, about.php, etc... Your include files can be named .htm, html, .php IE: "nav.htm"* Using ASP Includes:Same as in previous examples, except this is your replacement for the new included file: <!--#include file="/nav.asp" --> Or if the file os in another directory: <!--#include virtual="/folder/nav.asp" --> *To use ASP includes, you will need to name or rename your pages to .asp. IE: index.asp, about.asp, etc... Your include files can be named .htm, html, .asp, .txt... IE: "nav.htm"*
|
|
Copyright © 2005 georgeMedia, All Rights Reserved. |