View Full Version : Include Files

05-26-2011, 02:38 PM
Hi Guys,

Here is my code:

require($DOCUMENT_ROOT . "header.inc");

How do I make this work one directory down?

e.g. www.domain.co.uk/products/HERE.php

Hope that males sense.



05-26-2011, 02:40 PM
Assuming $DOCUMENT_ROOT is the actual document root, and header.inc is there, it should work.

05-26-2011, 02:42 PM
I have all the includes in the root of the file. But then I want to attach the same include one directory below. Does that make sense?

05-26-2011, 03:11 PM
Do you mean the file is in a parent folder? IE you need to go up a level to get the the file you wanna include? If so just put ../ before e.g. include("../header.inc");

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum