3

I'm trying to include the header at the top of my pages, but it gives me a blank screen. When I remove it the PHP file runs and shows the content:

<?php
    include("header.php");
?>

What's going wrong?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
getaway
  • 8,792
  • 22
  • 64
  • 94

2 Answers2

7

There is probably an error in that file. try turning display errors and reporting on:

ini_set('display_errors', 1);
error_reporting(E_ALL|E_STRICT);
prodigitalson
  • 60,050
  • 10
  • 100
  • 114
0

Since you're using "include" and not "require", the white screen means you have an error in header.php itself. Use error reporting to narrow the issue down and fix the root of the problem.

Kita
  • 1,548
  • 14
  • 21