What best practices should be followed when including files in PHP instead of using framesets?

When including files in PHP instead of using framesets, it is important to follow best practices to ensure security, maintainability, and performance. One key practice is to use PHP's include or require functions to bring in external files, rather than relying on framesets which can be less secure and harder to maintain. Additionally, using relative paths and properly sanitizing user input can help prevent security vulnerabilities.

<?php
// Include header file
include 'header.php';

// Include main content file
include 'content.php';

// Include footer file
include 'footer.php';
?>