Server Side Includes - SSI's:
The Server Includes One HTML File In Another On Request

Introduction and Overview

E06a - (4:13)

All of the information below the following horizontal rule, up to the second horizontal rule, is from another file (includedDemoFile.html) that is being included in this one:


There are many ways to insert html code from one html file into another, for example iframes. Another way is to use a server side include, also called an SSI.

Dynamic Content

E06b - (2:37)

SSI's - Server Side Includes

E06c - (9:43)

Include code

Seamless integration

Special file extension


Everything above the preceding horizontal rule is from the include file.

Exercise:

NOTE! The results of your include exercise code will be uploaded to my server and then viewable here (as soon as I grade them).

e06d - (2:44)

  1. Create a folder named yourlastname_E06
  2. Create a new file named yourlastname_E06.shtml in the folder you just made.
  3. Put two paragraphs of lorem ipsum text into it.
  4. Create another html file in the folder, leaving out all page structure tags.
  5. Name it yourlastname_E06_included.html
  6. Create a table on that page with just one row and one cell.
    1. Set the table width to 50%. The opening table tag will look like this:
          <table width=50% align=center>
    2. Put a single paragraph of a favorite quote in the lone cell.
    3. The only code on the page ought to be the single cell table with your favorite quote as its contents.
  7. Using the information from this page, put ssi code in between the two paragraphs in the first file so that the table from the second file will appear if the page is sent from a server (assume that the files are all in the correct location on the server relative to each other).
    • Unfortunately, you will not be able to test your files before you send me the folder (unless you have access to a server, which is beyond the scope of this).
    • Please double check that your code is correct so that when I test it, it will work. Again, use the information on this page to do the job.
  8. Please send me the folder with the two files in it.

Thanks