How to display PHP errors on a page

If you don't want to change php.ini and display all errors on every page, you can use ini_set on a page by page basis.

1

Add this at the top of your page to show errors on a PHP page:

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