What are common issues encountered when including files in PHP, and how can they be resolved?

Common issues when including files in PHP include incorrect file paths, missing files, and circular dependencies. To resolve these issues, make sure to use the correct file paths, check that the included files exist, and avoid circular dependencies by restructuring the code if necessary.

// Example of including a file with proper error handling
$file = 'path/to/file.php';

if (file_exists($file)) {
    include $file;
} else {
    echo 'File not found';
}