I developped a library in PHP5 and putted it into a directory of my website ("classes").
I created then three subfolders : "business", "data", "interface"
so my layer are well separeted. But of course, some files from the "business" directory must reference some files from the "data" directory.
Everything works fine as long as I include thoses classes from php document which are located into my root directory.
index.php -> require_once 'classes/business/user.class.php' ==> OK
but then :
order/order_details.php -> require_once '../classes/business/user.php' ==> FAIL
But where the error occurs is not in the order_details.php file but in the user.class.php which can't find other required files that are not in the same directory as user.class.php (ex : classes/data/database.class.php which is referenced as ../data/databse.class.php)
Is there a way to make that works ? I don't want to put all my interface files in the root directory and i want to be able to use my classes from anywhere in my website !
Please help it is urgent !!!
(I hop it is clear :-/ Feel free to ask me more details)