Prev Up Next
Go backward to 4.2 Individual CGI Introduction to Perl Topic
Go up to 4 Major Topics
Go forward to 4.4 CGI Introduction to Perl Topic #2

4.3 Individual Server Side Include Topic

Server side includes let you us a file that is mostly standard HTML but still have some variability in your document. This is often more convenient than writing a a CGI program to produce all of the document.

Please note that "exec cmd" is enabled on "cgi". Your Perl scripts will need to be in your cgi-bin subdirectory to work.

4.3.1 Preparation

Please read the following:
  1. CGI Programming by Gundavaram On the web at O'Reilly. Chapter 5. Server Side Includes page 87-100.

4.3.2 Individual Lab Assignment

Create a HTML (/public_html/name.shtml) page that uses several server side include directives.
  1. Printout, with some surrounding text, the IP name of the browser.
  2. A link to your first html file (4.1.2) that shows both the size of the file in bytes (use config sizefmt="bytes") and when the the file was last modified.
  3. Create (or copy from the examples, see CGI Programming by Gundavaram On the web at O'Reilly page 95) a counter.pl program that will count the number of time the page has been accessed. Use this program someplace on your page.
  4. Print out the time on the local server in "European" format. ( yyyy/mm/dd hh:mm where the hh for hours is between 0 and 23.)
  5. Modify your last lab (Section:4.2) so that it prints out a table with class members only. Include this on your page.
  6. Optional, something else that you might want to try.
  7. Create a "boiler plate" for the end of your documents that includes: Include this file at the end of your shtml file.

Please test your page with a web browser.

4.3.3 Report

Turn your report in at the lab as follows:
Instructor: ltaber@pima.edu** My new Home on phRed** The Pima College Site** The Mad Dr. G.'s home page on phred.

Prev Up Next