I'm trying to create a config.php file that defines a global variable which contains the path to a directory called "projectfiles". The idea is that any file can point to this directory regardless of where it is in the file tree.
Can I use __DIR__ for this? Would someone be willing to give me an example of how this might work? I was thinking of something like the following:
I want to define an directory here: in the /config.php file
$projectfiles = __DIR__("projectfiles/")
Then I want a library file to be able to use this variable in /venders/library/generalfunctions.php file
include("../../../config.php");
$file = $projectfiles/testfile.php
Suggestions?