Rabu, 22 Juli 2015

PHP : How To Hide All Error Message

In PHP error message helps us to debugging an application that we are building, the error message can point us in the file which contained the error. In fact we can know clearly on the line how many errors in our code.

However, please note that the error message can be a security gap in our application if the user can view the message. So I'll give you an example of how to hide all error messages in PHP level.

Put a single line of code below at the very top of your code.
error_reporting(0);
Note: Put the code only if your application is ready to be published, because if you put the code during the development it will be difficult for you in debugging your application and you will often find blank screen.
Share it Please

0 komentar:

Posting Komentar

Copyright @ 2013 Web Attribute. Designed by Templateism | Love for The Globe Press