Home > other >  Yii2 how to turn off the error page
Yii2 how to turn off the error page

Time:09-23


How to turn off this error page, I have set the entry file
Defined (' YII_DEBUG) or define (' YII_DEBUG, false);
Defined (' YII_ENV) or define (' YII_ENV ', 'prod');
But still there will be, how to turn off the

CodePudding user response:

In the configuration file
'errorHandler=& gt;
'errorAction=& gt; "Site/error,
],

CodePudding user response:

The building Lord, the wrong question for you is that you can unload your yii2, don't use this mistake won't occur,
Your problem is you are wrong, he would have to prompt you, tough can prompt success, the ostrich,
Want to close this mistake, too simple, to correct this mistake not to go,

CodePudding user response:

The building Lord said should be a mistake in what way to give more friendly, can choose json

CodePudding user response:

Defined (' YII_DEBUG) or define (' YII_DEBUG, false); Defined (' YII_ENV) or define (' YII_ENV ', 'prod'); Under the defined (' YII_DEBUG) print if this is true if it is will not walk or define (' YII_DEBUG, false);
Example
$a;
Define (' TD, 4);
Defined (" TD ") or $a=4;
echo $a; die;//$value does not exist a

CodePudding user response:

refer to the second floor weixin_38091211 response:
the building Lord, the wrong question for you is that you can unload your yii2, don't use this mistake won't occur,
Your problem is you are wrong, he would have to prompt you, tough can prompt success, the ostrich,
Want to close this mistake, too simple, to correct this mistake not to go,
you are a talent, really

CodePudding user response:

The
reference 2 floor & lt; Span style="color: # 4788 c7" & gt; Weixin_38091211 & lt;/span> Response:
the building Lord, the wrong question for you is that you can unload your yii2, don't use this mistake won't occur,
Your problem is you are wrong, he would have to prompt you, tough can prompt success, the ostrich,
Want to close this mistake, too simple, to correct this mistake not to go,
& lt; Br/& gt; Clear conditions, not afraid of error, because of some error can expose code or SQL. Use is impossible to a willing heart,
Understand?
  • Related