What are common pitfalls when using the header and include functions in PHP?

Common pitfalls when using the header and include functions in PHP include using them after any output has been sent to the browser, which can result in errors or unexpected behavior. To avoid this, make sure to use these functions before any HTML or text output in your PHP script.

<?php
// Correct way to use header and include functions
include 'header.php';
// Other PHP code here
?>