I've got a directory structure similar to this:
index.php
dirA
index.php
dirB
funcs.php
otherfuncs.php
in the root index.php, I've got:
require_once( dirB/funcs.php );
in funcs.php, I've got:
require_once( otherfuncs.php );
which works because the root index.php is the location from which files
are looked for.
In dirA/index.php, I've got:
require_once( ../dirB/funcs.php );
However, now, require_once( otherfuncs.php ) in funcs.php cannot be
found.
I can provide full a full path in each of the requires, but this would
lead to rather unstable code....or is this the right way to do things?
How do you work around this kind of issue?
Thank you.
--
== Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
"Therefore the considerations of the intelligent always include both
benefit and harm." - Sun Tzu
== Insults, like violence, are the last refuge of the incompetent... ===
index.php
dirA
index.php
dirB
funcs.php
otherfuncs.php
in the root index.php, I've got:
require_once( dirB/funcs.php );
in funcs.php, I've got:
require_once( otherfuncs.php );
which works because the root index.php is the location from which files
are looked for.
In dirA/index.php, I've got:
require_once( ../dirB/funcs.php );
However, now, require_once( otherfuncs.php ) in funcs.php cannot be
found.
I can provide full a full path in each of the requires, but this would
lead to rather unstable code....or is this the right way to do things?
How do you work around this kind of issue?
Thank you.
--
== Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
"Therefore the considerations of the intelligent always include both
benefit and harm." - Sun Tzu
== Insults, like violence, are the last refuge of the incompetent... ===
Comment