From the course: Learning PHP

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Why is my page blank?

Why is my page blank? - PHP Tutorial

From the course: Learning PHP

Start my 1-month free trial

Why is my page blank?

- [Instructor] One common scenario that can be confusing if you've never seen it before is your website loading a completely blank page, no mark up or anything. Now modern servers or even modern browsers might treat this error differently by showing a 500 error so you won't get a completely blank page but your page will be broken and you won't know why. Outside of a completely blank page, you might have an error where you have some output but at some point it just stops. And in any of these cases, this will happen if you have error reporting turned off in PHP. This will be most common with syntax errors because they completely stop the code from compiling. Remember that fatal errors terminate the code during runtime so any code that produced output before that fatal error will still show up. Of course, if there's a fatal error before any output, the page will also be blank. The best thing to do here is revisit the error…

Contents