Topic: How to create error log in your php projects.
If you want to hide all error from your web page and store all the error in log file then use below coding on all your php pages on top or include in
header.php
<?php
//error handling start
ini_set(‘error_reporting’, E_ALL );
ini_set(‘error_log’,'error_log.txt’);
ini_set(‘display_errors’,FALSE);
//error handling close
Share on Facebook?>
above said coding cretes a file error_log.txt file in your current directory where your program include this file.
Page views:1045