View your IP Address: (none)♦MembersHelpBookmarkNewHOT110mbAlexa Ranking

Vietnamese | English

StudyInfoTechSecurityEntertainmentTourismCareerSocialBusinessScience
World Times♦Vietnam:
♦California-USA:

Introduction to Server Side Includes



Products / Services

Basically, Server Side Includes are directives which you can place into your HTML (or other) documents to execute scripts or output, for example, environment variables or file statistics. Ok... that doesn't explain much so read on.

SSI are an Apache feature implemented by mod_include. This feature allows us to place special code 'elements' in our documents which will carry out certain actions as specified. When a page is sent from the server to the requesting client the page is scanned by the server for the SSI code elements and carry out the required actions based on the code element.

SSI is sort of like using your HTML server as a cut and paste editor. The server reads the document and parses it for directives. Follows the instructions that it finds and merges their results into creating a finished document. The document is then sent to the client browser.

SSI files, like Active Server Pages (ASP) and Internet Data Connector (IDC) files, are script-mapped by file extension to a preprocessor dynamic-link library (DLL). In the case of SSI, the handler is Ssiinc.dll. SSI files are usually named with .shtml file extensions (the most common extension configured to parse SSI by default), although extensions of .shtm, .htm, .html,... are also support through .htaccess

SSI is employed by the use of special preprocessing directives in SSI documents. These directives are parsed by the SSI DLL and processed. All directives are contained in HTML comment tokens and take the following general form:

<!--#<DIRECTIVE> [<ADDITIONAL DATA>] -->

What can SSI be used for ?

SSI can be used for many great things! Their primary uses are to provide interactivity to a web site and to aid site maintenance!

For example, content which is common to all your web pages can be placed in a single document and then included on ALL your pages. To make any changes you only need to modify this source document!

This is ideal for site navigation or copyright notices which are usually on all pages. having this content in a single file means changes can be done very quickly without having to modify 10, 20 or 50 separate documents!

What else can it be used for ?

Many things! Displaying document information such as document name, URI, last modified date, file size. Using the "echo command" you can 'echo' environmental variables, user information such as IP address or browser information! You can redirect visitors to a page depending on what browser version they are using. You can check what country they are from and display a custom message in their language! You can query and update a database or send an email, all without the use of a CGI script!

There are almost endless uses for SSI. Believe me, if you can use them do! They are easy to learn and will save you hours of work maintaining your sites as well as making them more dynamic!

Use SSI to make site navigation easily

The most common use of Server Side Includes is to edit a large amount of pages, just by editing one file. If you have a large site, using server side includes can make it a simple task to update your pages. I use server side includes in the top, side and bottom menu bars of this page. If I want to add another page to the menu or change a link, then I only have to make a change within the text file and it is done. If you use an editor like Dreamweaver, Frontpage or similar, just open the text file, make the change, save and its done.

By using simple Server Side Includes (SSI) you only need to change one text file and all your pages are automatically updated and that means less work for you.

View more... 
Select Vietnamese to find other information or service from Vietnamese site(s).

Email to your friendEmail to usGet updates by EmailView updates on WebFollow us on TwitterGoogle Safe BrowsingMcAfee SiteAdvisorDiagnostic this pageNoreton SafeWebDrWebTechnorati LinksSave to del.icio.usAdd to del.icio.usDigg This!Share on Facebookoutside.in: geotag this storyDiscuss on NewsvineStumble It!Add to Mixx!

If you would like to submit your website for FREE or advertise your own webpage(s) on our webpages, please enter Terms of Service webpage to send your request. Thank you!

©2004- ESI Portal ™®

Products / Services

(\__/)
(=^.^=)
(")_(")
ESI Portal
HOME
Top News
Online Tools
Online Translator
WYSIWYG Editor
Source Code Editor
Real Time Tool
2D Map Tool
3D Map Tool
Forex News
Online Shopping
Watch Videos
Listen Songs
Find Jobs
For Webmasters
About Us
Privacy Policy
Terms of Service
Contact Us
Live chat with us