Category: PHP

How to Remove Errors in PHP

Step 1 ) Open PHP.ini file from Wampserver as I opened in my System which is showing in the image below.


Step 2 ) Now we need to change error flag in php.ini. For this We have to add “error_reporting : E_ALL & ~E_NOTICE” on line number 104.After that Save the file.

error_reporting : E_ALL & ~E_NOTICE

Step 3 ) Now one more thing to do that we have to add  error_reporting(0); on the top of  Index.php file.After that Save the File & Restart the PHP&Apache Server.


Sample Index.Php file

require_once 'Spout/Autoloader/autoload.php';
use Box\Spout\Reader\ReaderFactory;

use Box\Spout\Common\Type;
$file = 'file name';
$reader = ReaderFactory::create(Type::type);
$response = array();
$i =1 ;
$hash = array();

<h3>Raw events for <?php echo $file; ?><h3>
 <td>Date Time</td>
 <td width="10%">&nbsp;</td>

Note – Don’t Forget to Restart  PHP&Apache after all the above step.