Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ts_tier_2_012010.doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
1.25 Mб
Скачать

9) Asp 3.0 iis 6 (Active Server Pages)

  • We currently use ASP 3.0 IIS 6.

  • ASP (Active Server Pages) is a type of language that enables dynamic and interactive content on web pages. ASP type pages have the extensions .asp or .aspx.

  • Any ASP pages on our server require Windows Services for ASP to be enabled and at least 1 .asp file; otherwise the content will not be requested through our web server and content will not be displayed.

A) asp Third Party Components

The following components are registered on our ASP systems:

  • ServerObjects(TM) Inc. - ASP Mail 4.0.30

  • Persits Software, Inc. - ASP JPEG 1.9.0.1

  • Persits Software, Inc. - ASP Upload 3.3.0.6

  • Persits Software, Inc. - ASP Encrypt 2.3.0.4

  • Persits Software, Inc. - ASPEmail 5.0.0.5

  • SoftArtisans, Inc. - SA-FileUP 3.2.0.5

  • Dimac AB - Jmail 4.1.2.5 ADVANTYS - SmartMail 2.6

  • ADVANTYS - SmartUpload 3.3

  • LinkPoint International - Linkpoint 6.0

  • MSWC.AdRotator

  • MSWC.BrowserType

  • MSWC.ContentRotator

  • MSWC.NextLine

  • CDONTS

  • CyberOffice Platform 2002

  • Soapbox Toolkit 2.0 SP1

  • Other components may be installed at the discretion of Hostopia.

B) Server.MapPath()

  • The MapPath method maps a relative or virtual path to a physical path.

  • This method does not check for the validity or the existence of the physical path. If the path starts with a forward or backward slash, the method returns the path as if the path is a full virtual path.

  • If the path does not start with a slash, then the method returns the path relative to the directory of the ASP file being processed. The Path argument is the path to be mapped.

<html>

<head>

</head>

<body>

The path of this file is <% Response.Write Server.MapPath(“test.asp”)%>

The path of this file1 is <% Response.Write Server.MapPath(“\test.asp”)%>

The path of this file2 is <% Response.Write Server.MapPath(“test\test.asp”)%>

The path of this file3 is <% Response.Write Server.MapPath(“\”)%>

</body>

</html>

C) The #include Directive

  • It is possible to insert the content of another file into an ASP file before the server executes it, with the #include directive.

  • The #include directive is used to create functions, headers, footers or elements that will be reused on multiple pages.

  • The "virtual" keyword allows you to include files from another virtual directory under the same web server. <!--#include virtual =”/header.inc”-- >

Bottom of Form

  • The "Include File" argument is used when the path to the document we want to include is given relative to the shtml file itself. In other words, the file we want to include is in the same directory as the file which contains the include command or in a directory below the file. Every file could be included with whatever extension. Please note that the include file will be treated as a regular text file For example index.shtml and include.txt are located in the same directory on the server. In order to include include.txt to index.shtml you will need to use the following directive:

<!--#include file="include.txt" -->

If include.txt contains <font color="red">test</font> you will see test on the index.shtml page.

  • "Include virtual" should be used when the path to the document is given relative to the document root (/public/).

For example include.txt is located in public/main/includes/ folder which is different from the index.shtml location. In this case you need to use the following directive:

<!--#include virtual="/main/includes/include.txt" -->

  • The only directive that will not function for an SSI is "include URL" which is not supported on our system.

  • The page that is using the SSI directive(s) must have the extension .shtml in order to allow the server to parse the SSI properly.

  • The SSI pages can be files of the following extensions: .htm, .html, .shtml, .txt, .ssi) BUT NEVER .inc

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]