Server Side Include Problem

D

Dennis Marks

I have a document called: http://www.dcs-chico.com/~denmarks/test.html.
The following is in the body
<!--#config timefmt="%c" -->
<!--#echo var="Last_Modified" -->
<!--#include virtual="/~denmarks/test2.data" -->
<!--#include file="test2.data" -->
test2.data contains a single line of text.
The statements are recognized as SSI even though I use html rather than
shtml (I have done it both ways).

The html was last modified on April 28. The ftp directory confirms this.

The "Last_Modified" returns "Friday April 23 10:33:04 2004".
The "include virtual" works. The line of text displays.
The "include file" does not work. It returns "include error - file not
found" as a comment in the source of the displayed document.

Why?

The ssi commands are a direct copy from my html file and are the ones
being executed.
 
T

Toby A Inkster

Dennis said:
The "include file" does not work. It returns "include error - file not
found" as a comment in the source of the displayed document.

Try using the /full/path/to/the/file.
 
D

Dennis Marks

Toby A said:
Try using the /full/path/to/the/file.

That is what include virtual is. I finially got hold of my ISP who said
that include file is from the web server's root folder. It looks like
include virtual with full path (omitting domain name) is the way to go.
(/~denmarks/filename)
 
T

Toby A Inkster

Dennis said:
That is what include virtual is.

No. Include virtual uses the path seen by a web browser. Include file uses
the file system path. Example, the following are roughly equivalent on
many Linux/Unix Apache servers:

<!--#include virtual="/~tai/myfile.txt"-->
<!--#include file="/home/tai/public_html/myfile.txt"-->
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top