开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜