marioo — 2012-07-14T11:43:00-04:00 — #1
I am having trouble with which kind of path to use.
The local site folder I am using is nested two levels under the root www folder in wamp. I am not being able to set up the links to work from the includes folder so I can test the site locally.
<li>Rates & reservations</li>
<li>You might like</li>
</nav><!-- end nav div -->
The other problem I am having related to this is the image not showing up locally on IE but working in FF but they do display on IE when posted live.
Hopefully that makes sense.
stevie_d — 2012-07-14T13:44:14-04:00 — #2
Moved to the "Website design" folder, because it isn't a PHP issue.
There are three types of URL referencing - absolute, relative and root. I think you're trying to choose between relative and root, not absolute.
Absolute - the full and complete URL for the resource, as it would appear in the address bar or a link from an external site, eg http://website.com/folder/file. You should use this whenever you are linking to external sites, or giving links that could be taken off-site, but there's no need to use them for internal links most of the time. (Note that different subdomains will count as 'external' for this purpose)
Relative - historically the most common form of internal linking, this is relative to the position of the current file. This is often the easiest and shortest way to give a URL, although in complex hierarchical structures it can get confusing.
Root - a link along the lines of /folder/file, with a / at the beginning, is always parsed relative to the domain root. This is useful when you have resources such as stylesheets and images that are stored in a single folder and shared across the whole site – much easier to remember that it's /images/arrow.png than using relative references and trying to remember how many folders deep you are. It's also common in any menu that is included (such as by SSI or PHP), because the menu needs to give the same results no matter what folder the file that is calling it is located in.
marioo — 2012-07-14T14:11:51-04:00 — #3
Thanks for the info, good to review.
The reason I thought it might be a php issue is because the page displays locally as a .html file (5) but not as a .php file.
Sorry I didn't say that above.
Why would it make a difference?
ralphm — 2012-07-15T04:38:54-04:00 — #4
the page displays locally as a .html file (5) but not as a .php file.
How are you accessing those files locally? You can't just double click them. You need to access them through your browser, with a specific URL.