What are the potential issues with including a file using include in PHP?

One potential issue with including a file using include in PHP is that if the file does not exist or there is an error in the file, it can cause the entire script to fail. To solve this issue, you can use the include_once or require_once functions instead, which will only include the file once and will throw a fatal error if the file cannot be included.

// Using require_once to include a file
require_once 'myfile.php';