Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
As cobylt said.
PHP can do include over http, but this function has to be specifically enabled to be working.
As much as possible, try to always use local file includes rather than http includes.
First: you know where the file is, and it's harder to hijack a file on the server than to forge the request path to another path.
Second: an http include is slower than a local file due to the network connection latency. On low to middle activity sites, it won't be noticed, but if your traffic goes up, it can slow down your site.
And just for the sack of it, try to make the include via absolute paths, using $_SERVER['DOCUMENT_ROOT'] as reference.
PHP Code:
include("includes/body.php");
might be valid in 1 place of your site, but not every, as it looks for an include directory from the current place
PHP Code:
include($_SERVER['DOCUMENT_ROOT']."/includes/body.php");
This specify that the included file is located in the includes directory from the root of your site, and it will work from any subdirectories.
__________________
Only a biker knows why a dog sticks his head out the window.
|