I got something like this, but it doesn't work, seems like it's not working because of the servername is shown.
DEFINE("APP_FOLDER", "website");
DEFINE("MODULES_DIR", $_SERVER["SERVER_NAME"].APP_FOLDER."/modules");
include_once(MODULES_DIR."/class-ViewRender.php");
It shows an error: *Warning: include_once(localhost/website/modules/class-ViewRender.php): failed to open stream.*
What I also want is that I can have a file like this
myappfolder/pages/users.php -> the file class-ViewRender.php should be successfully included
myappfolder/pages/administration/administrativeusers.php -> Here the file class-ViewRender.php should be successfully included as well.
How can I achieve this including the same config.php in every php file?