Forum Moderators: coopster

Message Too Old, No Replies

Including files inside includes

         

supermanjnk

1:27 pm on Nov 24, 2004 (gmt 0)

10+ Year Member



lets say i have my index.php

inside that i have:

<? include ($_SERVER['DOCUMENT_ROOT'].'/include/leftcontent.php');?>

inside that I have

<? include ($_SERVER['DOCUMENT_ROOT'].'/include/navigation.php');?>

is this the way i should do this, or is there a better way that I should set the full path to the include,

I can't just use include/navigation.php because the include directory will not always be directly under the current page. Is there another way to define the path for the include?

coopster

1:31 pm on Nov 24, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have a look at Control your included files in the latest Bag 'o Tricks [webmasterworld.com] thread.

supermanjnk

1:40 pm on Nov 24, 2004 (gmt 0)

10+ Year Member



Thanks, I'll take a look.