Hiya everyone,
My problem is that I can't find a way to include files within an included file, that works on my PC & server.
I have a globle-var.php file which holds a variable
#$domain = "http://www.mywebiste.com";
$domain = "http://localhosts";
#$root = "/";
$root = "/webwrk/mywebsite/";
$base_path = "$domain"."$root";
$inc_path = $base_path . "include/";
When I inlcude a php file in the webpage, I include it as @include("../myincludefile.inc"); relavite to the page.
but if I'm including a php file in a include file I do it as @include($inc_path . "myincludefile.inc"); or @include($base_path . "include/myincludefile.inc");
I find this works fine for some include file, but not all.
Is there a better way of doing things?
or have I not written it correctly?
I do find that if I use $_SERVER['PHP_SELF'] on my local host it misses off http://localhost is this correct?
& is it possable to use this for the includes which work on my PC & the web Server?
Many Thanks
Adam Courthold - BIGmrC