What are some potential pitfalls of using relative web paths in PHP scripts?

Using relative web paths in PHP scripts can lead to issues with file inclusion and require statements if the script is not located in the same directory as the file being included. To avoid this problem, it is recommended to use absolute paths instead of relative paths to ensure that the correct files are included regardless of the script's location.

// Incorrect usage of relative path
include 'includes/header.php';

// Correct usage of absolute path
include __DIR__ . '/includes/header.php';