PHP headers_sent() May 25, 2012 Pramod T P It checks whether headers have been sent . Example <?php if (!headers_sent()) { header(“Location: http://www.phpcodez.com/”); exit; } ?>