What role do include files play in causing the "headers already sent" error in PHP, and how can this issue be mitigated?

When include files contain whitespace or any output before the `session_start()` function is called, it can cause the "headers already sent" error in PHP. To mitigate this issue, ensure that there is no whitespace or output before calling `session_start()` in any included files.

<?php
ob_start(); // Start output buffering

// Include files here

ob_end_flush(); // End output buffering and flush output
session_start(); // Start the session
?>