For building sites that can more easily be moved from one server to another, and allows simpler updating of common information like email address and phone number of the client.
Here’s some PHP to generate paths: both server paths and domain paths good for use in all sorts of ways for include and require statements.
// for INCLUDE statements – this is the local server path
$urlPATH = “http://” . $_SERVER[‘SERVER_NAME’];
$srvPATH = $_SERVER[‘DOCUMENT_ROOT’];