What are some alternative methods to include external scripts in PHP without extensive reprogramming?

When including external scripts in PHP, one commonly used method is the `include` or `require` functions. However, these methods may require extensive reprogramming if the script paths need to be changed frequently. An alternative approach is to use the `$_SERVER['DOCUMENT_ROOT']` variable to dynamically include scripts based on the server's document root path.

<?php
$script_path = $_SERVER['DOCUMENT_ROOT'] . '/path/to/external-script.php';
include($script_path);
?>