A fairly simple question:
I have a library A which depends on library B and C.
Currently I have:
<?php
include("A.inc. php");
include("B.inc. php");
include("C.inc. php");
?>
....in my HTML.
This needs changing to:
<?php
include("../A.inc.php");
include("../B.inc.php");
include("../C.inc.php");
?>
....if I call it from deeper in the directory tree.
I don't want lots of includes in my HTML. I want to write:
<?php
include("A.inc. php");
?>
....and to have the other includes in the "A.inc.php" file.
However if I put:
include("B.inc. php");
include("C.inc. php");
....in the library, it doesn't fild the files when included using:
<?php
include("../A.inc.php");
?>
....in an HTML file some distance from the root.
I don't want to wire absolute paths in.
I *could* pass the "../" in as a method parameter - but that
seems like a total mess.
What is the best way to resolve this issue?
--
__________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
I have a library A which depends on library B and C.
Currently I have:
<?php
include("A.inc. php");
include("B.inc. php");
include("C.inc. php");
?>
....in my HTML.
This needs changing to:
<?php
include("../A.inc.php");
include("../B.inc.php");
include("../C.inc.php");
?>
....if I call it from deeper in the directory tree.
I don't want lots of includes in my HTML. I want to write:
<?php
include("A.inc. php");
?>
....and to have the other includes in the "A.inc.php" file.
However if I put:
include("B.inc. php");
include("C.inc. php");
....in the library, it doesn't fild the files when included using:
<?php
include("../A.inc.php");
?>
....in an HTML file some distance from the root.
I don't want to wire absolute paths in.
I *could* pass the "../" in as a method parameter - but that
seems like a total mess.
What is the best way to resolve this issue?
--
__________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
Comment