PHP: Show PHP errors messages for debugging code
Need to easily debug some php code? simple add the following code to your script to enable PHP error reporting and display error messages. This allows you to quickly debug without making configuration changes to servers PHP configuration.
It is good practice to hide error messages for security reasons, error messages could be used by hackers to gather information and vulnerabilities.
1 2 |
ini_set('error_reporting', E_ALL & ~E_NOTICE); ini_set('display_errors', On); |
This code is provided as it and may require changes to work for your needs.