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.

This code is provided as it and may require changes to work for your needs.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.