Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Because the path you give without a prefix / is relative to the actual script place.
If you add an / at the beginning, it means that the path will be absolute from the root of the server, not the root of your web site.
If your site is being served via apache, you have access to the absolute value of your site root folder in $_SERVER['DOCUMENT_ROOT']
So, to solve this, simply include with this:
PHP Code:
<?php require_once($_SERVER['DOCUMENT_ROOT'].'/includes/logo.html'); ?>
Quote:
|
Is there a limitation to using virtual php includes?
|
No, except sanity.
In absolute, you could put 1 line of your program in 1 file, and use include to assemble the final script, but that would be pretty insane, wouldn't it?
__________________
Only a biker knows why a dog sticks his head out the window.
Last edited by tripy; 05-09-2009 at 06:23 PM..
|