Home >PHP Framework >YII >How to block error prompts in Yii

How to block error prompts in Yii

藏色散人
藏色散人Original
2020-07-20 11:14:013111browse

Yii method to block error prompts: first open the entry file "index.php"; then add "error_reporting (0);"; finally comment "defined('YII_DEBUG') or define('YII_DEBUG', true);" that's it.

How to block error prompts in Yii

yii Shield error prompt

Process in the entry file index.php:

Add Top: error_reporting (0);

Comments: defined('YII_DEBUG') or define('YII_DEBUG',true);

Recommended : "yiiTutorial"

In addition: The error handler is registered in the constructor method in the application, using the PHP functions set_exception_handler and set_error_handler. If you don't want Yii to handle errors and exceptions, you can define YII_ENABLE_ERROR_HANDLER and YII_ENABLE_EXCEPTION_HANDLER as false in the entry file.

The above is the detailed content of How to block error prompts in Yii. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn