I want to switch to a new host, and they provide this little "temporary url" to check your files before you switch. All beautiful and dandy. Therefore, I copy all my files. At the top of each page, I require another file from the server, which is stored in public_html/includes/head.php . Now, for some reason, the $ _SERVER ['document_root'] var parameter returns / public _html / htdocs / includes / head.php (which does not exist on the server), rather than / public _html / includes / head.php (which exists) The error received is as follows:
Warning: require_once(/home/secure31/public_html/htdocs/includes/head.php) [function.require-once]: failed to open stream: Permission denied in /home/stephe80/public_html/index.php on line 6
Wine Code:
require_once($_SERVER['DOCUMENT_ROOT'] . '/includes/head.php');
I tend to think that this is an error related to their temporary url setting, but I do not want to pass it through my DNS and find out that all my files are corrupted. I could change them to absolute paths, but I am curious if I am missing something. Any insight would be appreciated. Thanks!
source share