Web Development Blog

Web Development on Subdomains on Godaddy Servers ( $_SERVER[`DOCUMENT_ROOT`] Issue)

 When developing website on subdomain on Godaddy server you might require to include files, but  $_SERVER['DOCUMENT_ROOT'] does not work as supposed to, dolution is really simple, replace $_SERVER['DOCUMENT_ROOT'] with $_SERVER['SUBDOMAIN_DOCUMENT_ROOT'], and new variable will act like the old one but for the given subdomian,

Associated tags:  Godaddy, DOCUMENT_ROOT, SUBDOMAIN_DOCUMENT_ROOT

Add Comment:

CAPTCHA