Turn off display errors using file “php.ini”

前端 未结 12 1368
春和景丽
春和景丽 2020-11-28 06:59

I am trying to turn off all errors on my website. I have followed different tutorials on how to do this, but I keep getting read and open error messages. Is there something

12条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-28 07:24

    You can also use PHP's error_reporting();

    // Disable it all for current call
    error_reporting(0);
    

    If you want to ignore errors from one function only, you can prepend a @ symbol.

    @any_function(); // Errors are ignored
    

提交回复
热议问题