Debug Your Code

One problem with PHP is that it's very easy to miss some error messages because it outputs them along with the rest of your content, if they are minor. To avoid this, check the output your pages produce in order to make sure PHP is not emitting errors behind your back. Alternatively, make sure error logging is turned on in your php.ini file, then check the error log regularly.

Get PHP in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.