HOME BLOG PORTFOLIO PHOTO CONTACT
How to create error log in your php projects.

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

 

Php logo IMAGE

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

?>

 

above said coding cretes a file error_log.txt file in your current directory where your program include this file.

   Share on Facebook

Page views:1238