How can paths be adjusted when moving a PHP script to a different server to avoid errors?

When moving a PHP script to a different server, paths may need to be adjusted to ensure that the script can locate necessary files or resources. One common approach is to use the `$_SERVER['DOCUMENT_ROOT']` variable to dynamically determine the root directory of the server, and then build paths relative to that root.

// Adjust paths when moving PHP script to a different server
$root_path = $_SERVER['DOCUMENT_ROOT'];
include($root_path . '/path/to/your/file.php');