What are some common pitfalls when including files in PHP scripts?

One common pitfall when including files in PHP scripts is not using the correct file path or not properly handling errors if the file cannot be found. To solve this issue, always use the correct file path relative to the current script location and use functions like `require_once` or `include_once` to include files to prevent errors if the file is not found.

// Correct way to include a file using require_once
require_once 'path/to/file.php';