1.Common syntax errors in PHP
Named Function and Variables do not follow the rules. Lack of parameter passed to the function.
Misspellings: coders can write or call the wrong name of the function, the variable name.
Beyond calculation: When programmers require exceed the capabilities of the server will cause the errors that sometimes can not be determined
2.Use the command Die();
Die ($ variable) print out the contents of the variable and end the program at the location calling the die ()
3.Hide errors for users
Do not display the error message to the user which cause a negative impact on users and websites.
4.Setting the notification section is displayed
Hide all errors: error_reporting (0);
Show all errors: error_reporting (E_ALL);
Displays the warning: error_reporting (E_WARNING);
Displays the notice: error_reporting (E_NOTICE);
The value displayed is the default setting: error_reporting (E_ALL ^ E_NOTICE);
No comments:
Post a Comment