display errors – PHP Reference Book Blog https://phpreferencebook.com/ PHP Reference: Beginner to Intermediate PHP5 Sun, 01 Oct 2017 17:21:19 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.13 Display all PHP Errors and Warnings https://phpreferencebook.com/tips/display-all-php-errors-and-warnings/ https://phpreferencebook.com/tips/display-all-php-errors-and-warnings/#comments Tue, 16 Sep 2008 05:10:08 +0000 https://phpreferencebook.com/?p=18 Every time I was debugging my pages I found myself searching around for this little chunk of code to display PHP errors. So, I put in the book so it was always nearby. Since people still search google endlessly, I thought I would provide it here as well. If you wish to see all the PHP errors and warnings in your script, include the following bit of code:

error_reporting(E_ALL);
ini_set('display_errors', '1');

Now, continue to beat your head against your keyboard while you continue to hunt down your missing semicolon or closing parenthesis.

]]>
https://phpreferencebook.com/tips/display-all-php-errors-and-warnings/feed/ 6