In PHP, what are the drawbacks of including pure HTML files using include, and what alternative methods can be used for template inclusion?
Including pure HTML files using include in PHP can lead to potential security risks as the files may contain executable PHP code. To avoid this, it is recommended to use PHP files for template inclusion instead. One alternative method is to use require_once or include_once to include PHP files that contain only HTML markup.
<?php
// Include a PHP file containing HTML markup
require_once('template.php');
?>