How to disable E_STRICT

后端 未结 5 1365
天命终不由人
天命终不由人 2020-12-17 10:15

I need to turn off E_STRICT. I have error_reporting = E_ALL & ~E_STRICT in my php.ini but it seems to be ignored. I tried this in my code:

ini_set(\'erro         


        
5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-17 10:27

    You mentioned you're using a framework (would be good to know which one) anyway you can add something like this on the very first index.php:

    error_reporting(E_ERROR | E_WARNING | E_PARSE);
    ini_set('display_errors', 'On');
    

    But make sure you're on the first index.php that gets called, meaning the very first in the stack, for certain framework that would save you some pain.

    Other thing: most of the frameworks have their own config file to address production software VS. development software and they have their own way of doing things, so I would start from there....have a look at the docs and find out if there's anything there you need to change...it could be a super simple change on a config file most likely.

提交回复
热议问题