PHP Include
Posted: Fri Nov 02, 2007 2:50 pm
Hi,
I am having some trouble using php include function.
Please consider the following directory structure:
I have a php script in the following directory:
res/common/
The file I am trying call via the include function is in the following directory:
includes/
I am calling the file as follows:
This does not work so I have also tried:
The only way I can get it to work is as follows:
It seems odd that I can only call the function successfully if I use the domain name.
Any thoughts?
Thanks,
Rob.
I am having some trouble using php include function.
Please consider the following directory structure:
I have a php script in the following directory:
res/common/
The file I am trying call via the include function is in the following directory:
includes/
I am calling the file as follows:
Code: Select all
include("includes/menu.php")Code: Select all
include("../../includes/menu.php")Code: Select all
include("http://www.mydomain/includes/menu.php")Any thoughts?
Thanks,
Rob.