Stupid Question

Stupid Question

Posted by: Jon123
Posted on: 2005-10-08 14:16:00

I cannot figure this out for the life of me.

When you have a file in a sub-folder, like a news folder, what is the path to your highest directory? I have a an shtml file in my news folder, and in my root folder, I have all of my SHTML left and right menu files. When I use something like "[!--#include file="header.shtml" --]" in the file that is in the sub folder, it never imbeds my left menu in the page because I have the path wrong to the root directory with the SHTML file. So, does anyone know the path to linking to a higher directory? I tried many different paths, but none ever worked.

Thanks in advance.

Re: Not So Stupid Question

Posted by: ardco
Posted on: 2005-10-08 15:08:00

> When you have a file in a sub-folder, like a news folder, what is the path to your highest directory?

Assuming by "highest" directory you mean the /home/user/example.com directory, not your /home/user directory:

[!--#include virtual="/header.shtml"--]

I remember taking a while to get this right; file, virtual, yeah ok...

Good luck,

BobS

Re: Not So Stupid Question

Posted by: Jon123
Posted on: 2005-10-08 15:23:00

Thank you, that worked. :D

What about PHP includes, though, in a .php file?

ex: [?PHP include("header.shtml");?]

Re: Not So Stupid Question

Posted by: decswxaqz
Posted on: 2005-10-09 00:16:00

Same thing. / takes you to the root dir in Unix, to the root dir in Windows. ../ will take you up a directory branch.

Tags: pathsub folderstupid questionroot folderroot directory