what are the best practises for hiding all php errors? As I don\'t want ERRORS to show to the user.
I\'ve tried using the .htacess
by p
Per the PHP documentation, put this at the top of your php scripts:
http://php.net/manual/en/function.error-reporting.php
If you do hide your errors, which you should in a live environment, make sure that you are logging any errors somewhere. How to log errors and warnings into a file? Otherwise, things will go wrong and you will have no idea why.