php hide ALL errors

前端 未结 5 2200
自闭症患者
自闭症患者 2020-12-01 03:57

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

5条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 04:08

    The best way is to build your script in a way it cannot create any errors! When there is something that can create a Notice or an Error there is something wrong with your script and the checking of variables and environment!

    If you want to hide them anyway: error_reporting(0);

提交回复
热议问题