How can a global configuration file be used to manage include paths in PHP?

When working on a PHP project with multiple files and directories, managing include paths can become cumbersome. One way to streamline this process is by using a global configuration file to define include paths that can be easily accessed throughout the project. By centralizing this information, it becomes easier to update include paths and ensure consistency across files.

// config.php
define('INCLUDE_PATH', '/path/to/includes');

// index.php
include_once 'config.php';
include_once INCLUDE_PATH . '/header.php';
include_once INCLUDE_PATH . '/footer.php';