What are common beginner mistakes when including files in PHP, and how can they be avoided?

Common beginner mistakes when including files in PHP include using incorrect file paths, not checking if the file exists before including it, and including files multiple times which can lead to errors. To avoid these mistakes, always use the correct file paths, check if the file exists before including it, and use functions like `require_once` or `include_once` to prevent multiple inclusions.

// Correct way to include a file in PHP
if (file_exists('path/to/file.php')) {
    require_once 'path/to/file.php';
} else {
    echo 'File not found';
}