PDA

View Full Version : SSI includes


SrbShooter
12-9-05, 03:26 PM
Hey.
I'm trying to get server side includes to work, and I have succesfully done so on my homepage which is located in the same folder that the files I want to be included are located in. But when I try to include that file from another folder, I get an error message. What would be the proper path to get to the files from another directory?

Thanks.

BerksWebGuy
12-9-05, 04:04 PM
Show the code you are using. If the file was in "htdocs/includes", then the ssi path would look like "/includes/file.txt"

See more here: http://kb.powweb.com/categories/SSI/


To include a file within a page:

An included file can be .txt, .html, .htm, .php, etc.

<!--#include file="myfile.xxx"-->

This can call any file that resides within the originating directory ONLY. If you are trying to use SSI and have a file in a different directory that you wish to call, then you need to use the <!--#include virtual="/folder/myfile.xxx" -->

<!--#include virtual="/footer.html"-->

SrbShooter
12-9-05, 10:18 PM
OMG you're my hero!

Thank you very much!