So I have:
Page A - /WWW/index.php
Page B - /WWW/folder/index.php
Page C - /WWW/assets/functions.php
I want to be able to use the same line of code to include Page C on Page A and Page B.
Right now for Page A: include "/assets/functions.php";
Page B: include "../assets/functions.php";
The "../" is what bugs me. Depending on how many times the file is nested in folder I have to add a "../"
I tried: include dirname(__FILE__) . "/assets/functions.php";
But it works on Page A and not Page B.
Also in the function.php I want to be able to include other PHP files.