Operation Manual

Table Of Contents
417
Coding
Last updated 11/30/2015
Note: Unfortunately, IIS won’t let you include a file in a folder above the current folder in the folder hierarchy, unless special
software has been installed on the server. If you must include a file from a folder higher in the folder hierarchy on an IIS
server, ask your system administrator if the necessary software is installed.
For other kinds of servers, or if you don’t know what kind of server youre using, ask your system administrator
which option to use.
Some servers are configured to examine all files to see if they contain server-side includes; other servers are
configured to examine only files with a particular file extension, such as .shtml, .shtm, or .inc. If a server-side include
isn’t working for you, ask your system administrator if you need to use a special extension in the name of the file
that uses the include. (For example, if the file is named canoe.html, you may have to rename it to canoe.shtml.) If
you want your files to retain .html or .htm extensions, ask your system administrator to configure the server to
examine all files (not just files with a certain extension) for server-side includes. Parsing a file for server-side
includes takes a little extra time, so pages that the server parses are served a little more slowly than other pages;
therefore, some system administrators wont provide the option of parsing all files.
Insert server-side includes
You can use Dreamweaver to insert server-side includes in your page.
Insert a server-side include
1 Select Insert > Server-Side Include.
2 In the dialog box that appears, browse to and select a file.
By default, a File type of include is inserted.
3 To change the type of the include, select the server-side include in the Document window and change the type in
the Property inspector (Window > Properties), as follows:
If your server is an Apache web server, select Virtual. In Apache, Virtual works in all cases, while File works only
in some cases.
If your server is a Microsoft Internet Information Server (IIS), select File. (Virtual works with IIS only in certain
specific circumstances.)
Note: Unfortunately, IIS won’t allow you to include a file in a folder above the current folder in the folder hierarchy,
unless special software has been installed on the server. If you need to include a file from a folder higher in the folder
hierarchy on an IIS server, ask your system administrator if the necessary software is installed.
For other kinds of servers, or if you don’t know what kind of server youre using, ask your system administrator
which option to use.
Change which file is included
1 Select the server-side include in the Document window.
2 Open the Property inspector (Window > Properties).
3 Do one of the following:
Click the folder icon and browse to and select a new file to include.
In the box, type the path and filename of the new file to include.