Error messages area unit your 1st line of defense as a developer. you do not need to be developing code in PHP on a server that's not organized to show error messages.
However, confine mind that once your code is debugged and prepared to travel live, you need, you would like and you wish to form positive error coverage is turned off as a result of you do not want guests to your web site seeing error messages which will provide them enough information to take advantage of a weakness and hack your site.
Error reporting in PHP
There are many configuration settings in the php.ini file which makes peoples life's easier in the development process, however, set this value to On by replacing Off:
display_errors = On
The error_reporting variable has a default value of E_ALL.
Therefore, replace the default value of error_reporting as follows:
error_reporting = E_ALL & ~E_NOTICE
Restart Apache, and you're all set. Next, you'll learn how to do the same thing on Apache.
0 Comment(s)