Hi Everyone i know this is a bit basic, but I have been working on a project and to tidy things up i have been placing them in directories.
my problem is I need to know how to plan this so i dont need to call an "include" or "require" in every page.
as it gets difficult when you are going back a directory and then into another directory for example:
in the html folder I have
index.php
sessions/login.php
functions/functions.php
index.php can all the functions via "include ('functions/functions.php');
but if we need the login.php to require functions it needs to be ('../functions/functions.php');
this can sometimes having something like a header.php in every page as it would call the script wrong directory.
would some be able to help so that i either don't need to include a script on every page, or maybe i can define functions that are a constant?
please let me now if this makes no sense! as ts a little difficult to explain.
Thanks in advance for any help given <3