I am having problems getting document from a custom script inside the theme. It simple not including the domain part.
Here is the current way I am using:
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
and the path I get is like:
/home/content/01/0151247/html
although I know it should be like:
/home/content/01/0151247/html/mydomain
I really have no idea how to fix that, what way I should use instead to get the domain folder get included. Manually defining it is not an option as it might change.
Maybe someone could suggest. Thank you.