Home | Members | PHP Scripts | Search | Guide | Whois Service | Contact Us
Perl Scripts

Adv Logger
Adv Backup
Adv Bandwidth
Adv Guestbook
Adv Search
Adv Domain
Adv Print
Adv Emailit
Adv Mailer
Adv MySql Backup

Buy/Order

Custom Scripts

Free Scripts

Perl Info
Users Online
Users Today



GUIDE

How do I include one file in another file like headers, footer?

The concept of joining the output from multiple files at the server level is called SSI. Server Side Include. This is very useful for adding common headers and footers to all your pages.

By default SSI will work only on files ending with .shtml , create a file called test.shtml and another file called header.htm.

Put this in the test.shtml where you want header.htm to be included.
#<!--#include virtual="header.htm" -->

Now upload both file test.shtml and header.htm to the webserver. Using your browser go to http://www.yourdomain.com/test.shtml (Replace yourdomain.com with actual domain). You should get the output of the merged file.

You can also include the output of a PERL/CGI script into a html file. a sample include statement would look like.
#<!--#include virtual="/cgi-bin/online/today.cgi" -->

See Also : How to enable SSI on non .shtml files?

Back to Guide

 

 

 
Copyright 2000-2003 © Perlonline.com. All rights reserved
Site Powered by Plussoftware Solutions