Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Server-Side Web Programming with Active Server Pages and Server Side Includes (SSI), Slides of Fundamentals of E-Commerce

An overview of server side includes (ssi) technology, its syntax, examples, and considerations for use with active server pages (asp). Ssi allows webservers to parse html files and replace special codes with data, such as file timestamps. File includes, timestamp includes, ssi syntax, and considerations for using ssi with asp.

Typology: Slides

2012/2013

Uploaded on 07/30/2013

asif.ali
asif.ali 🇮🇳

5

(3)

140 documents

1 / 9

Toggle sidebar

Related documents


Partial preview of the text

Download Server-Side Web Programming with Active Server Pages and Server Side Includes (SSI) and more Slides Fundamentals of E-Commerce in PDF only on Docsity!

Server-Side Web Programming

with Active Server Pages

Server Side Includes (SSI)

Server Side Includes (SSI)

  • A technology supported by many

webservers.

  • Server parses HTML files and replaces

special codes with data (e.g., file timestamp).

  • Codes inserted as HTML comments.• Example: <!--

#include file="something.inc" -->

SSI Syntax

• Whole command must be enclosed with

HTML comment indicators.

  • Comment terminator must be preceded with

a space to avoid problems.

  • Whole command must be on one line.• Don't forget the # before the command.

SSI Examples

File Includes This works in all ASP pages on default NT Server configuration. Timestamp Includes This works only on .stm, .shtm, and .shtml files on default NT Server

configuration.

SSI Considerations

-^

SSI codes work on most UNIX servers.

-^

File includes supported in .asp pages on mostMicrosoft webservers -- other includes dependenton server configuration.

-^

On Windows webservers, try using .shm or .shtmlfile extension to support other SSIs

-^

If using FrontPage, consider using file includesupported by FrontPage Extensions.

ASP & SSI Considerations

  • ASP coding best practice -- use of SSI file

includes for sharing code and variablesamong ASP pages.^ <%@ language=VBScript %><% option explicit %><%'Constants'Dims'Functions and Procedures%>

ASP & SSI Considerations

  • Included ASP scripts must be in a code

block or will be displayed.^ <% 'CONSTANTSconst BkgrndColor = '#ffffff'const TitleColor

= '#000000'

%>

ASP & SSI Considerations

  • File includes are inserted into the ASP page

BEFORE

the ASP code is interpreted.

  • Cannot dynamically determine file to include: NO
**BUT** <% Select Case pickFile

Case 1: %><% Case Else: %><% End Select %>

ASP & SSI Considerations

  • Microsoft recommends using .inc file

extension for includes. But not a secure fileextension by default. Use .asp instead.

  • Use includes for your common functions,

etc. to reuse code and increasemaintainability.