When I include files in PHP, it gives me a blank screen?
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:
&开发者_Go百科lt;?php
include("header.php");
?>
What's going wrong?
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);
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.
精彩评论