php hide ALL errors

前端 未结 5 2192
自闭症患者
自闭症患者 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:22

    to Hide All Errors:

    error_reporting(0);
    ini_set('display_errors', 0);
    

    to Show All Errors:

    error_reporting(E_ALL);
    ini_set('display_errors', 1);
    

提交回复
热议问题