I wonder if it’s possible to make php look for files in a specified directory (e.g /site/rootfolder) when “/” is used in functions like file_get_contents, but still be able to access things like mysql functionality outside this specified root
That doesn’t tell me anything. Give high level overview of what you have going on and what a solution, whatever is does to “simplifies, the setup is more elegant and it becomes more logical for my users”.