Forum Moderators: coopster
lib/b.php:
function b() {
return a();
}
app/app.php:
include('../lib/a.php');
include('../lib/b.php');
a();
now, the question:
do u include("a.php") in lib/b.php or app/app.php?
this is just an example
but when: lib/d.php lib/e.php lib/...php all need lib/a.php
do u include("a.php") in lib/*.php or in app/app.php?
Similar to your app choice but I would do it this way
libs.php
include "../lib/a.php";
include "../lib/b.php";
then every page on the site can just
include "libs.php";
Then any section or page specific libs can be included individually. It really helps manage libs across large sites and not try to chase a spaghetti mess of nested includes.