The INCLUDE Directive:
|
|||||||||||||||||||||||||||||
|
Originally, this was the idea behind server side includes- being
able to well, umh, include or copy files into a document. Think of
it as being sort of like a document merge in word processing.
Please take a moment to view the lower and side parts of this page. In the actual source code shtml file, everything after You will now have a directory entry in the document directory and your include should work just fine!does not exist in the document file. Instead, all that is there are the following lines:
<!--#include file="mailform1.txt" --> This SSI directive allows us to easily update the navigation bar and fine print statement on any page that includes the directive. To change any page, we need only edit the mailform1.txt file. That is a timesaver!
Including Files Outside Your Document Directory The unix ln (link) command allows you to create a entry in a directory that points to a real file located elsewhere on the computer. If you have a file called myfile.txt located in /usr/me/mybookfiles/source you could do this:You will now have a directory entry in the document directory and your include should work just fine!cd public_html (or wherever your webpage is located)
If Your Files are Under Your DocumentRoot If the file you want to include in your page is located some where under your DocumentRoot directory (the one with your main index page), you can use the virtual type of include:<!--#include virtual="/file.txt" --> |
|
|
|
|
| <reallybig.com>
Web Builder Network Portal |
| Advertise on the Reallybig.com Network |
| BigNoseBird Newsletter |
|
|