What are the best practices for organizing and managing file paths in PHP includes?

When organizing and managing file paths in PHP includes, it is best to use absolute paths instead of relative paths to avoid issues with file inclusion across different directories or servers. Additionally, defining a base path constant can help make the code more readable and maintainable.

// Define a base path constant
define('BASE_PATH', dirname(__FILE__) . '/');

// Include files using absolute paths
include BASE_PATH . 'includes/header.php';
include BASE_PATH . 'includes/footer.php';