Page 1 of 1

Include PHP

Posted: Tue Nov 25, 2008 7:04 am
by Aravinthan
Hey,
Ok i got a problem, that is pretty much simple but it is killing me.
I have 2 folders:
36Drew
and Division1
There is a file in division1(nav.php) that I want to include in index.php in 36Drew folder. How can I link it? I tried giving the direct adress(url) didnt work. Then I gave: www/Division1/nav.php didnt work. So I am bit lost.

Thanks for your help,
Ara

Re: Include PHP

Posted: Tue Nov 25, 2008 7:06 am
by papa
Have you tried include() or include_once() ?

Re: Include PHP

Posted: Tue Nov 25, 2008 7:40 am
by aceconcepts
when using include etc... use "../" to navigate up one level. If desired file is two levels up then use "../../"

Re: Include PHP

Posted: Tue Nov 25, 2008 3:56 pm
by Aravinthan
I tried it aceconcepts, but it doesnt work.

Re: Include PHP

Posted: Tue Nov 25, 2008 5:53 pm
by Syntac

Code: Select all

include "../Division1/nav.php";