This tutorial will help you to enable PHP errors to display on the web browser. This is helpful for debugging purpose.

 

First of all, enable the display_errors parameter in your php.ini configuration file.

display_errors = on

 

Then, add the following code to your the application PHP script. For example, add this code to your index.php or other default load script.

<?php
 
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

 

Here is a sample index.php with enabled error to display on the browser.

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)