Include Paths

All right… now Ive had this issue before.

I’ve my site basic, ok…. now

list. cfm

These days, my includes appear like this
< a href=" test. cfm" >

Should the menu file is a part of index. cfm, this url is
siteroot. com/test. cfm

Which can be perfect, now merely include the same file within a page in the prospect folder
it is siteroot. com/customer/test. cfm

WE do understand why this happens, however we would like them to link to
siteroom. com/file. cfm from the siteroot pages and pages in just about any subdirectory.

Ive tested out doing < a href=". /.. /test. cfm" > but this seems to use the path from the page im in (i thought it used the road of the includes directory)

I am using coldfusion btw.
I realize how to do this within php, but cant quite have the CF equiv.

No, always uses the page use as a reference point. It’s not any PHP or CF thing, it’s an HTML CODE thing. More really simply a folder directory matter actually

I found the most effective to this.
In php it had been actually $SERVERDOCUMENT_ROOT + method to file.

THis seems to your workplace as well:

< a href=" /carp. cfm" > the / brings you to the root folder (wherever r ftp logs u in).

So i connect to stuff like this
< a href=" /teammate/index. cfm" >

the site is in
+teammate folder
-index. cfm

If you know for certain the site will be without attention domain or subdomain (i. electronic., not under the subdirectory), prefixing everything with / could be the most reliable and provides far fewer severe headaches than relative inbound links.

This entry was posted in Web Design and tagged , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *