|
Posted by Chung Leong on 01/25/06 03:18
bryan wrote:
> lets say I have file, index.php that includes a file logic.class.php,
> and inside of index.php i initialize the class, $logic = new logic;
> now, lets say that the $logic object inside the class file uses ANOTHER
> class, $template = new template; for templating it and lets say the
> TEMPLATE object users ANOTHER class...my question is does it matter how
> far down you go inside the files? will they all still work fine? Is
> there a limit? Is this just bad design? Need some input.
In my opinion, there is no "good" and "bad" in programming. Just "what
works" and "what doesn't work."
IFAIK there is no limit to how many level of includes you have. It's a
matter of personal preference. Personally I perfer to include only at
the top level so that it's easier to see what files are involved in a
particular script.
Navigation:
[Reply to this message]
|