Serve side includes
- Started
- Last post
- 7 Responses
- mikeim
I'm using them in a site im buildin and the files that use them are in the same directory.
Im tryin to create use the same includes in files that are in a seperate directory and it's not working. It doesn't see the images.
What am i doin wrong or is this even possible?
- creole0
Make sure your path to the image folder is correct. When viewing the master page, check the source. The path is relative to the page calling the include, not the include file.
- mikeim0
yep, checked that, it's:
../include.html
BTW, im using dreamweaver and I know ive done this before in an earlier version.
- tfs__mag0
if it's in asp you can do [--#include virtual="/path/from/root.htm"--] and use the root path.
- gabriel_pc0
are you doing the hosting yourself? if not, some hosting providers disable server side includes that call a file that is outside of the calling page's directory.
- mikeim0
not hosting it myself.
i think i found a work around, im using absolute paths on the server include files.
- tfs__mag0
no they disable parent paths which means you cant do "../directory/something.asp" you can still do virtual paths such as "/directory/something.asp" the reason they disable parent paths is because they can inadvertently allow access to system files.
- gabriel_pc0
the on I was on disabled all out of folder paths regardless of where they pointed. It didn't allow any folder-related characters (/,..,) at all.