What are the potential pitfalls of using "include()" to directly include PHP files with HTML code?

Using "include()" to directly include PHP files with HTML code can potentially lead to security vulnerabilities, as it allows for the execution of PHP code within the included file. To mitigate this risk, it is recommended to place all PHP logic in separate files and use "require_once()" instead of "include()" to include them in your HTML files. This ensures that the PHP code is executed only once and helps prevent any unwanted code execution.

<?php
require_once('path/to/your/phpfile.php');
?>