How to Enable / Disable errors in php

Error enable helps developer to find out the errors while they working on any project in developer mode. They wants to check error in website so they track it and marks as solve. To enable error in PHP

error_reporting(E_ALL);
ini_set('display_errors', 'On');

When developer build all application and move to product into live (production mode). then its need to hide error listing on website

error_reporting(E_ALL);
ini_set('display_errors', 'Off');

 

 

Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.
Yes0
No0
Harinder Singh

Harinder Singh

My name is Harinder Singh and I specialize in Software industry. I consider myself as a life learner. I love learning new concepts, embracing new ideas and reading and searching for innovation.