Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question

closed as too localized by toscho Jul 27 '12 at 22:36

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

Don't know what you want exactly you want because $_SERVER["DOCUMENT_ROOT"] gives me the path to my root properly. You could try the following and see if it contains any info that helps you.

echo '<pre>';
print_R($_SERVER);
echo '</pre>';
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.