Are there best practices for configuring links in PHP include files to work with different directory structures?

When including files in PHP, it's important to consider the directory structure of your project to ensure that links within included files work correctly. One best practice is to use PHP's magic constant `__DIR__` to get the absolute path of the current directory and then construct links relative to that path. This approach ensures that links will work regardless of the directory structure.

<?php
// Include file using absolute path
include __DIR__ . '/path/to/file.php';
?>