I just migrated my website from another host, and I'm having some trouble with PHP.
I have this line in my index.php:
PHP Code:
require($_SERVER["DOCUMENT_ROOT"]."/template.php");
This throws an error:
Fatal error: require() [function.require]: Failed opening required '/var/www/html/template.php' (include_path='.:') in /membri/kendallfrey/index.php on line 12
Using PHP, how can I access the root folder where my files are from any subfolder? $_SERVER["DOCUMENT_ROOT"] is normally supposed to do that, but it doesn't work here. I don't want to have to manually specify a relative path.