Specifying Relative path
Posted: Tue May 22, 2012 11:53 pm
This should be easy for PHP masters and i am really struggling with it.
My question: How do you specify the relative path for include or require functions
For example, if my directory hierarchy is like this:
[text]
root
|--dirA
|--- design
| ---- header.php
| ---- dirB
| ---- dirc
[/text]
How do is specify the relative paths for include and require functions to access:
a) header.php from root
b) header.php from dir b
c) header.php from dir c
I somewhere read that you need to specify some path in php.ini. I really dont want to do all that and really hope that PHP has simpler method for specifying paths.
Thanks a lot !
My question: How do you specify the relative path for include or require functions
For example, if my directory hierarchy is like this:
[text]
root
|--dirA
|--- design
| ---- header.php
| ---- dirB
| ---- dirc
[/text]
How do is specify the relative paths for include and require functions to access:
a) header.php from root
b) header.php from dir b
c) header.php from dir c
I somewhere read that you need to specify some path in php.ini. I really dont want to do all that and really hope that PHP has simpler method for specifying paths.
Thanks a lot !