What is the best practice for handling errors when including files in PHP?

When including files in PHP, it is important to handle errors that may occur during the inclusion process. One common way to do this is by using the `require_once` or `include_once` functions, which will include the file only once and throw a fatal error if the file cannot be included. Additionally, you can use the `file_exists` function to check if the file exists before including it, and handle any errors or exceptions that may arise.

// Check if the file exists before including it
$file_path = 'path/to/file.php';

if (file_exists($file_path)) {
    require_once $file_path;
} else {
    // Handle the error or exception
    echo "File not found!";
}